summaryrefslogtreecommitdiff
path: root/spec/models/repository_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r--spec/models/repository_spec.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index df0ab7bc0f4..6f9fdcf4482 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -1705,17 +1705,25 @@ describe Repository do
context 'when ref is a tag' do
let(:ref) { 'refs/tags/v1.0.0' }
- it 'returns the tag' do
+ it 'returns a tag' do
is_expected.to be_a(Gitlab::Git::Tag)
end
+
+ it 'returns the correct tag' do
+ expect(subject.name).to eq('v1.0.0')
+ end
end
context 'when ref is a branch' do
let(:ref) { 'refs/heads/master' }
- it 'returns the branch' do
+ it 'returns a branch' do
is_expected.to be_a(Gitlab::Git::Branch)
end
+
+ it 'returns the correct branch' do
+ expect(subject.name).to eq('master')
+ end
end
context 'when ref is invalid' do