From 0668521b2b8ed32f4a3f192a8ad04c64f6c1c0cd Mon Sep 17 00:00:00 2001 From: Alexis Reigel Date: Fri, 24 Feb 2017 20:16:04 +0100 Subject: move current keychain methods to namespace --- spec/models/gpg_key_spec.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'spec/models') 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 -- cgit v1.2.1