Skip to content

Commit

Permalink
Merge pull request #1800 from python-gitlab/jlvillal/dot_branch
Browse files Browse the repository at this point in the history
chore: add test case to show branch name with period works
  • Loading branch information
nejch committed Jan 4, 2022
2 parents 1f95613 + ea97d7a commit 896a8c7
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.name == fetched_branch.name

branch.delete()

0 comments on commit 896a8c7

Please sign in to comment.