Skip to content

Commit

Permalink
Merge pull request #4 from civisanalytics/pin-attr_encrypted-to-v1.3
Browse files Browse the repository at this point in the history
[CIVP-13270] Pinning attr_encrypted to v1.3.X
  • Loading branch information
Brian Nichols authored Nov 10, 2017
2 parents eff7b52 + b0c8881 commit 491d834
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion devise-two-factor.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |s|

s.add_runtime_dependency 'railties'
s.add_runtime_dependency 'activesupport'
s.add_runtime_dependency 'attr_encrypted', '>= 1.3', '< 4', '!= 2'
s.add_runtime_dependency 'attr_encrypted', '>= 1.3', '< 2', '!= 2'
s.add_runtime_dependency 'devise', '~> 4.0'
s.add_runtime_dependency 'rotp', '~> 3.0'

Expand Down
6 changes: 3 additions & 3 deletions spec/devise/models/two_factor_authenticatable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ def save(validate)

describe 'otp_secret options' do
it 'should be of the key' do
expect(subject.encrypted_attributes[:otp_secret][:key]).to eq('test-key'*8)
expect(subject.evaluated_attr_encrypted_options_for(:otp_secret)[:key]).to eq('test-key'*8)
end

it 'should be of the mode' do
expect(subject.encrypted_attributes[:otp_secret][:mode]).to eq(:per_attribute_iv_and_salt)
expect(subject.evaluated_attr_encrypted_options_for(:otp_secret)[:mode]).to eq(:per_attribute_iv_and_salt)
end

it 'should be of the mode' do
expect(subject.encrypted_attributes[:otp_secret][:algorithm]).to eq('aes-256-cbc')
expect(subject.evaluated_attr_encrypted_options_for(:otp_secret)[:algorithm]).to eq('aes-256-cbc')
end
end
end
Expand Down

0 comments on commit 491d834

Please sign in to comment.