diff options
author | Liora Milbaum <liora@lmb.co.il> | 2022-10-15 10:52:13 +0300 |
---|---|---|
committer | Nejc Habjan <hab.nejc@gmail.com> | 2022-10-15 17:32:43 +0200 |
commit | d542eba2de95f2cebcc6fc7d343b6daec95e4219 (patch) | |
tree | 737eaedb10d4025789458beaf517b334e77110e9 | |
parent | 9a6d197f9d2a88bdba8dab1f9abaa4e081a14792 (diff) | |
download | gitlab-d542eba2de95f2cebcc6fc7d343b6daec95e4219.tar.gz |
chore: topic functional tests
-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() |