diff options
author | Robert Speicher <robert@gitlab.com> | 2017-09-29 01:43:37 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-09-29 01:43:37 +0300 |
commit | 07c3112ef540a78c4a84281368eb975ba27a1f4c (patch) | |
tree | c1059a3b6cf1c70c5be3e725cfffa19ced02e08e /spec/models/repository_spec.rb | |
parent | 3d899a7d2ecc6a815a4c6d0885ff3d24dba74f3c (diff) | |
parent | 3944e16b4bd716fd1f317c89c2c0910de76a2c33 (diff) |
Merge branch 'feature/migrate-repository-rm-tag-to-gitaly' into 'master'
Migrate Git::Repository#rm_tag to Gitaly
Closes gitaly#562
See merge request gitlab-org/gitlab-ce!14388
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r-- | spec/models/repository_spec.rb | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 07d9b66060e..e63977adec8 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -1682,12 +1682,22 @@ describe Repository do end describe '#rm_tag' do - it 'removes a tag' do - expect(repository).to receive(:before_remove_tag) + shared_examples 'removing tag' do + it 'removes a tag' do + expect(repository).to receive(:before_remove_tag) - repository.rm_tag(create(:user), 'v1.1.0') + repository.rm_tag(build_stubbed(:user), 'v1.1.0') - expect(repository.find_tag('v1.1.0')).to be_nil + expect(repository.find_tag('v1.1.0')).to be_nil + end + end + + context 'when Gitaly operation_user_delete_tag feature is enabled' do + it_behaves_like 'removing tag' + end + + context 'when Gitaly operation_user_delete_tag feature is disabled', skip_gitaly_mock: true do + it_behaves_like 'removing tag' end end |