@@ -10,19 +10,25 @@ def test_topics(gl, gitlab_version):
1010create_dict = {"name" :"my-topic" ,"description" :"My Topic" }
1111if gitlab_version .major >= 15 :
1212create_dict ["title" ]= "my topic title"
13- topic = gl .topics .create (
14- {"name" :"my-topic" ,"title" :"my topic title" ,"description" :"My Topic" }
15- )
13+ topic = gl .topics .create (create_dict )
1614assert topic .name == "my-topic"
15+
1716if gitlab_version .major >= 15 :
1817assert topic .title == "my topic title"
18+
1919assert gl .topics .list ()
2020
2121topic .description = "My Updated Topic"
2222topic .save ()
23-
2423updated_topic = gl .topics .get (topic .id )
2524assert updated_topic .description == topic .description
2625
27- topic .delete ()
26+ create_dict = {"name" :"my-second-topic" ,"description" :"My Second Topic" }
27+ if gitlab_version .major >= 15 :
28+ create_dict ["title" ]= "my second topic title"
29+ topic2 = gl .topics .create (create_dict )
30+ merged_topic = gl .topics .merge (topic .id ,topic2 .id )
31+ assert merged_topic ["id" ]== topic2 .id
32+
33+ topic2 .delete ()
2834assert not gl .topics .list ()