Skip to content

Commit

Permalink
chore: add test case to branch name with period works
Browse files Browse the repository at this point in the history
Add a test case to show that a branch name with a period can be
fetched with a `get()`

Closes: #1715
  • Loading branch information
JohnVillalovos committed Jan 4, 2022
1 parent 80754a1 commit 296544a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions 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.id == fetched_branch.id

branch.delete()

0 comments on commit 296544a

Please sign in to comment.