diff options
Diffstat (limited to 'tests/functional/api/test_topics.py')
-rw-r--r-- | tests/functional/api/test_topics.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/functional/api/test_topics.py b/tests/functional/api/test_topics.py index 0d6a3ef..7777725 100644 --- a/tests/functional/api/test_topics.py +++ b/tests/functional/api/test_topics.py @@ -10,19 +10,25 @@ def test_topics(gl, gitlab_version): create_dict = {"name": "my-topic", "description": "My Topic"} if gitlab_version.major >= 15: create_dict["title"] = "my topic title" - topic = gl.topics.create( - {"name": "my-topic", "title": "my topic title", "description": "My Topic"} - ) + topic = gl.topics.create(create_dict) assert topic.name == "my-topic" + if gitlab_version.major >= 15: assert topic.title == "my topic title" + assert gl.topics.list() topic.description = "My Updated Topic" topic.save() - updated_topic = gl.topics.get(topic.id) assert updated_topic.description == topic.description - topic.delete() + create_dict = {"name": "my-second-topic", "description": "My Second Topic"} + if gitlab_version.major >= 15: + create_dict["title"] = "my second topic title" + topic2 = gl.topics.create(create_dict) + merged_topic = gl.topics.merge(topic.id, topic2.id) + assert merged_topic["id"] == topic2.id + + topic2.delete() assert not gl.topics.list() |