diff options
author | John L. Villalovos <john@sodarock.com> | 2022-07-28 21:01:41 -0700 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2022-07-28 21:01:41 -0700 |
commit | 271f6880dbb15b56305efc1fc73924ac26fb97ad (patch) | |
tree | f6d9faa21e616d6f77f682e230c6c61395275130 /tests/functional/api | |
parent | 69014e9be3a781be6742478af820ea097d004791 (diff) | |
download | gitlab-271f6880dbb15b56305efc1fc73924ac26fb97ad.tar.gz |
chore(topics): 'title' is required when creating a topic
In GitLab >= 15.0 `title` is required when creating a topic.
Diffstat (limited to 'tests/functional/api')
-rw-r--r-- | tests/functional/api/test_topics.py | 11 |
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" |