summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2022-01-03 16:59:42 -0800
committerJohn L. Villalovos <john@sodarock.com>2022-01-03 16:59:42 -0800
commitea97d7a68dd92c6f43dd1f307d63b304137315c4 (patch)
tree4da9019a0eb8b1d936769447822f4bb43bfc537a
parent80754a17f66ef4cd8469ff0857e0fc592c89796d (diff)
downloadgitlab-jlvillal/dot_branch.tar.gz
chore: add test case to show branch name with period worksjlvillal/dot_branch
Add a test case to show that a branch name with a period can be fetched with a `get()` Closes: #1715
-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()