Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-27 16:34:05 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-27 16:34:05 +0300
commit37add27a00d38e4edaaec945ed9f44a123523884 (patch)
tree4d034575e8c6ee6019125ed820309989c25106ea /spec/lib/gitlab/crypto_helper_spec.rb
parent3dfbfa4e4f2ce962660dc534ac7a8c670049b506 (diff)
Improve token authenticable tests and exceptions
Diffstat (limited to 'spec/lib/gitlab/crypto_helper_spec.rb')
-rw-r--r--spec/lib/gitlab/crypto_helper_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/lib/gitlab/crypto_helper_spec.rb b/spec/lib/gitlab/crypto_helper_spec.rb
index bd3a38bfbaa..05cc6cf15de 100644
--- a/spec/lib/gitlab/crypto_helper_spec.rb
+++ b/spec/lib/gitlab/crypto_helper_spec.rb
@@ -5,7 +5,7 @@ describe Gitlab::CryptoHelper do
it 'generates SHA256 digest Base46 encoded' do
digest = described_class.sha256('some-value')
- expect(digest).to match %r{^[A-Za-z0-9+/=]+$}
+ expect(digest).to match %r{\A[A-Za-z0-9+/=]+\z}
expect(digest).to eq digest.strip
end
end
@@ -14,7 +14,8 @@ describe Gitlab::CryptoHelper do
it 'is Base64 encoded string without new line character' do
encrypted = described_class.aes256_gcm_encrypt('some-value')
- expect(encrypted).to match %r{^[A-Za-z0-9+/=]+$}
+ expect(encrypted).to match %r{\A[A-Za-z0-9+/=]+\z}
+ expect(encrypted).not_to include "\n"
end
end