summaryrefslogtreecommitdiff
path: root/spec/models/gpg_key_spec.rb
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-02-24 20:16:04 +0100
committerAlexis Reigel <mail@koffeinfrei.org>2017-07-27 15:40:41 +0200
commit0668521b2b8ed32f4a3f192a8ad04c64f6c1c0cd (patch)
tree6c3a1266ae720bb04bde8d67afe26a6ade3c061d /spec/models/gpg_key_spec.rb
parent0e3d3d60bae48f3698f9e7b0e060edb67170b11e (diff)
downloadgitlab-ce-0668521b2b8ed32f4a3f192a8ad04c64f6c1c0cd.tar.gz
move current keychain methods to namespace
Diffstat (limited to 'spec/models/gpg_key_spec.rb')
-rw-r--r--spec/models/gpg_key_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/models/gpg_key_spec.rb b/spec/models/gpg_key_spec.rb
index 889396c19c3..e8c41299937 100644
--- a/spec/models/gpg_key_spec.rb
+++ b/spec/models/gpg_key_spec.rb
@@ -24,17 +24,19 @@ describe GpgKey do
describe 'add_to_keychain' do
it 'calls add_to_keychain after create' do
- expect(Gitlab::Gpg).to receive(:add_to_keychain).with(GpgHelpers::User1.public_key)
+ expect(Gitlab::Gpg::CurrentKeyChain).to receive(:add).with(GpgHelpers::User1.public_key)
create :gpg_key
end
end
describe 'remove_from_keychain' do
it 'calls remove_from_keychain after destroy' do
- allow(Gitlab::Gpg).to receive :add_to_keychain
+ allow(Gitlab::Gpg::CurrentKeyChain).to receive :add
gpg_key = create :gpg_key
- expect(Gitlab::Gpg).to receive(:remove_from_keychain).with(GpgHelpers::User1.fingerprint)
+ expect(
+ Gitlab::Gpg::CurrentKeyChain
+ ).to receive(:remove).with(GpgHelpers::User1.fingerprint)
gpg_key.destroy!
end