diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2017-09-20 13:11:51 +0300 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2017-09-29 00:36:40 +0300 |
commit | 3944e16b4bd716fd1f317c89c2c0910de76a2c33 (patch) | |
tree | 5e1db612d3db4fd64bf4efc05dddb0b1e3a12f91 /spec/models/repository_spec.rb | |
parent | 67d3ddfdb681d4e791b3b3b716d2b772f530cc86 (diff) |
Migrate Git::Repository#rm_tag to Gitaly
Closes gitaly#562
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 76bb658b10d..036545a5563 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -1682,12 +1682,22 @@ describe Repository, models: true 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 |