diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-11-16 00:27:11 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-12-08 19:28:55 +0100 |
commit | 2b4883e05e59eff08088e378bf3061d9d8da13dd (patch) | |
tree | 12743680c5055183d063f79ab194659432321d92 /spec/models/repository_spec.rb | |
parent | b6c8d3ac9f3031f6174dde2f11b3876ab4ac8a20 (diff) | |
download | gitlab-ce-2b4883e05e59eff08088e378bf3061d9d8da13dd.tar.gz |
Check for Tag/Branch corectness
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r-- | spec/models/repository_spec.rb | 12 |
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 |