diff options
author | Stan Hu <stanhu@gmail.com> | 2018-06-01 20:59:04 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-06-01 20:59:04 +0300 |
commit | 81e899ea7141b34a7860f308327249784fb5d6cc (patch) | |
tree | dfb47ec0b8c866c8232b367d2d9d82a1887024bc /spec/models/concerns | |
parent | 160cc6cd7b0218cdd1e210c4133fd469ffacf656 (diff) | |
parent | b5c706326ada2c0d213dd512842c5f677d9d94f9 (diff) |
Merge branch 'sh-bump-ruby-2.4' into 'master'
Upgrade to Ruby 2.4.4
See merge request gitlab-org/gitlab-ce!19055
Diffstat (limited to 'spec/models/concerns')
-rw-r--r-- | spec/models/concerns/has_variable_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/models/concerns/has_variable_spec.rb b/spec/models/concerns/has_variable_spec.rb index f87869a2fdc..3fbe86c5b56 100644 --- a/spec/models/concerns/has_variable_spec.rb +++ b/spec/models/concerns/has_variable_spec.rb @@ -45,8 +45,10 @@ describe HasVariable do end it 'fails to decrypt if iv is incorrect' do - subject.encrypted_value_iv = SecureRandom.hex + # attr_encrypted expects the IV to be 16 bytes and base64-encoded + subject.encrypted_value_iv = [SecureRandom.hex(8)].pack('m') subject.instance_variable_set(:@value, nil) + expect { subject.value } .to raise_error(OpenSSL::Cipher::CipherError, 'bad decrypt') end |