diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-02-24 22:16:04 +0300 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 16:40:41 +0300 |
commit | 0668521b2b8ed32f4a3f192a8ad04c64f6c1c0cd (patch) | |
tree | 6c3a1266ae720bb04bde8d67afe26a6ade3c061d /spec/models | |
parent | 0e3d3d60bae48f3698f9e7b0e060edb67170b11e (diff) |
move current keychain methods to namespace
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/gpg_key_spec.rb | 8 |
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 |