summaryrefslogtreecommitdiff
path: root/tests/functional/api/test_topics.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/api/test_topics.py')
-rw-r--r--tests/functional/api/test_topics.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/functional/api/test_topics.py b/tests/functional/api/test_topics.py
index 7ad71a5..0d6a3ef 100644
--- a/tests/functional/api/test_topics.py
+++ b/tests/functional/api/test_topics.py
@@ -4,11 +4,18 @@ https://docs.gitlab.com/ce/api/topics.html
"""
-def test_topics(gl):
+def test_topics(gl, gitlab_version):
assert not gl.topics.list()
- topic = gl.topics.create({"name": "my-topic", "description": "My Topic"})
+ 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"}
+ )
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"