summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2022-01-04 02:13:51 +0100
committerGitHub <noreply@github.com>2022-01-04 02:13:51 +0100
commit896a8c72ed32d6c22a202d86283cab2b7af44522 (patch)
tree4bfdb43dab022f7b2f2c9deb0c707d0113ddb612
parent1f9561314a880048227b6f3ecb2ed59e60200d19 (diff)
parentea97d7a68dd92c6f43dd1f307d63b304137315c4 (diff)
downloadgitlab-896a8c72ed32d6c22a202d86283cab2b7af44522.tar.gz
Merge pull request #1800 from python-gitlab/jlvillal/dot_branch
chore: add test case to show branch name with period works
-rw-r--r--tests/functional/api/test_branches.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/functional/api/test_branches.py b/tests/functional/api/test_branches.py
new file mode 100644
index 0000000..0621705
--- /dev/null
+++ b/tests/functional/api/test_branches.py
@@ -0,0 +1,17 @@
+"""
+GitLab API:
+https://docs.gitlab.com/ee/api/branches.html
+"""
+
+
+def test_branch_name_with_period(project):
+ # Make sure we can create and get a branch name containing a period '.'
+ branch_name = "my.branch.name"
+ branch = project.branches.create({"branch": branch_name, "ref": "main"})
+ assert branch.name == branch_name
+
+ # Ensure we can get the branch
+ fetched_branch = project.branches.get(branch_name)
+ assert branch.name == fetched_branch.name
+
+ branch.delete()