mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-07-29 12:00:32 +00:00
10 lines
386 B
Ruby
10 lines
386 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.shared_context 'with encryption key' do |key_type, secret|
|
|
before do
|
|
key = instance_double(ActiveRecord::Encryption::Key, secret: secret)
|
|
key_provider = instance_double(Gitlab::Encryption::KeyProviderWrapper, encryption_key: key)
|
|
allow(Gitlab::Encryption::KeyProvider).to receive(:[]).with(key_type).and_return(key_provider)
|
|
end
|
|
end
|