summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMark Fletcher <mark@gitlab.com>2017-03-16 19:48:09 +0530
committerMark Fletcher <mark@gitlab.com>2017-03-16 21:04:58 +0530
commit45976540799e34fa07e7830ed52a7d6616cde3d7 (patch)
treeee50c3a8d46b4f4eb29a95d909de564b10d6dea6 /spec
parent68e64a5b44b7a0f540214ee8a3ca36ffcdb4fc6c (diff)
downloadgitlab-ce-45976540799e34fa07e7830ed52a7d6616cde3d7.tar.gz
Fix archive prefix bug for refs containing dots
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/git/repository_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb
index 9c3a4571ce4..9ed43da1116 100644
--- a/spec/lib/gitlab/git/repository_spec.rb
+++ b/spec/lib/gitlab/git/repository_spec.rb
@@ -90,6 +90,12 @@ describe Gitlab::Git::Repository, seed_helper: true do
expect(prefix).to eq("#{project_name}-test-branch-SHA")
end
+
+ it 'returns correct string for a ref containing dots' do
+ prefix = repository.archive_prefix('test.branch', 'SHA')
+
+ expect(prefix).to eq("#{project_name}-test.branch-SHA")
+ end
end
describe '#archive' do