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 | |
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')
-rw-r--r-- | spec/initializers/secret_token_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/concerns/has_variable_spec.rb | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/spec/initializers/secret_token_spec.rb b/spec/initializers/secret_token_spec.rb index d56e14e0e0b..c3dfd7bedbe 100644 --- a/spec/initializers/secret_token_spec.rb +++ b/spec/initializers/secret_token_spec.rb @@ -1,5 +1,5 @@ require 'spec_helper' -require_relative '../../config/initializers/secret_token' +require_relative '../../config/initializers/01_secret_token' describe 'create_tokens' do include StubENV 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 |