Commit e9515dff authored by Alexis Reigel's avatar Alexis Reigel

remove the :gpg rspec tag

since everything (except the CurrentKeyChain method) operates on a
tempoary keychain anyway we don't need this anymore.
parent 9a759c62
require 'rails_helper' require 'rails_helper'
feature 'Profile > GPG Keys', :gpg do feature 'Profile > GPG Keys' do
let(:user) { create(:user, email: GpgHelpers::User2.emails.first) } let(:user) { create(:user, email: GpgHelpers::User2.emails.first) }
before do before do
......
...@@ -44,8 +44,14 @@ describe Gitlab::Gpg do ...@@ -44,8 +44,14 @@ describe Gitlab::Gpg do
end end
end end
describe Gitlab::Gpg::CurrentKeyChain, :gpg do describe Gitlab::Gpg::CurrentKeyChain do
describe '.add', :gpg do around do |example|
Gitlab::Gpg.using_tmp_keychain do
example.run
end
end
describe '.add' do
it 'stores the key in the keychain' do it 'stores the key in the keychain' do
expect(GPGME::Key.find(:public, GpgHelpers::User1.fingerprint)).to eq [] expect(GPGME::Key.find(:public, GpgHelpers::User1.fingerprint)).to eq []
......
...@@ -13,7 +13,7 @@ describe GpgKey do ...@@ -13,7 +13,7 @@ describe GpgKey do
it { is_expected.not_to allow_value('BEGIN PGP').for(:key) } it { is_expected.not_to allow_value('BEGIN PGP').for(:key) }
end end
context 'callbacks', :gpg do context 'callbacks' do
describe 'extract_fingerprint' do describe 'extract_fingerprint' do
it 'extracts the fingerprint from the gpg key' do it 'extracts the fingerprint from the gpg key' do
gpg_key = described_class.new(key: GpgHelpers::User1.public_key) gpg_key = described_class.new(key: GpgHelpers::User1.public_key)
...@@ -45,7 +45,7 @@ describe GpgKey do ...@@ -45,7 +45,7 @@ describe GpgKey do
end end
end end
describe '#emails', :gpg do describe '#emails' do
it 'returns the emails from the gpg key' do it 'returns the emails from the gpg key' do
gpg_key = create :gpg_key, key: GpgHelpers::User1.public_key gpg_key = create :gpg_key, key: GpgHelpers::User1.public_key
...@@ -53,7 +53,7 @@ describe GpgKey do ...@@ -53,7 +53,7 @@ describe GpgKey do
end end
end end
describe '#emails_with_verified_status', :gpg do describe '#emails_with_verified_status' do
it 'email is verified if the user has the matching email' do it 'email is verified if the user has the matching email' do
user = create :user, email: 'bette.cartwright@example.com' user = create :user, email: 'bette.cartwright@example.com'
gpg_key = create :gpg_key, key: GpgHelpers::User2.public_key, user: user gpg_key = create :gpg_key, key: GpgHelpers::User2.public_key, user: user
......
...@@ -141,12 +141,6 @@ RSpec.configure do |config| ...@@ -141,12 +141,6 @@ RSpec.configure do |config|
config.around(:each, :postgresql) do |example| config.around(:each, :postgresql) do |example|
example.run if Gitlab::Database.postgresql? example.run if Gitlab::Database.postgresql?
end end
config.around(:each, :gpg) do |example|
Gitlab::Gpg.using_tmp_keychain do
example.run
end
end
end end
FactoryGirl::SyntaxRunner.class_eval do FactoryGirl::SyntaxRunner.class_eval do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment