diff options
author | Stan Hu <stanhu@gmail.com> | 2018-06-01 17:59:04 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-06-01 17:59:04 +0000 |
commit | 81e899ea7141b34a7860f308327249784fb5d6cc (patch) | |
tree | dfb47ec0b8c866c8232b367d2d9d82a1887024bc /spec/models | |
parent | 160cc6cd7b0218cdd1e210c4133fd469ffacf656 (diff) | |
parent | b5c706326ada2c0d213dd512842c5f677d9d94f9 (diff) | |
download | gitlab-ce-81e899ea7141b34a7860f308327249784fb5d6cc.tar.gz |
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')
-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 |