File tree 1 file changed +11
-5
lines changed
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -10,19 +10,25 @@ def test_topics(gl, gitlab_version):
10
10
create_dict = {"name" : "my-topic" , "description" : "My Topic" }
11
11
if gitlab_version .major >= 15 :
12
12
create_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 )
16
14
assert topic .name == "my-topic"
15
+
17
16
if gitlab_version .major >= 15 :
18
17
assert topic .title == "my topic title"
18
+
19
19
assert gl .topics .list ()
20
20
21
21
topic .description = "My Updated Topic"
22
22
topic .save ()
23
-
24
23
updated_topic = gl .topics .get (topic .id )
25
24
assert updated_topic .description == topic .description
26
25
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 ()
28
34
assert not gl .topics .list ()
You can’t perform that action at this time.
0 commit comments