diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 18:40:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 18:40:28 +0300 |
commit | b595cb0c1dec83de5bdee18284abe86614bed33b (patch) | |
tree | 8c3d4540f193c5ff98019352f554e921b3a41a72 /spec/lib/gitlab/regex_spec.rb | |
parent | 2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff) |
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'spec/lib/gitlab/regex_spec.rb')
-rw-r--r-- | spec/lib/gitlab/regex_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/lib/gitlab/regex_spec.rb b/spec/lib/gitlab/regex_spec.rb index d48e8183650..a3afbed18e2 100644 --- a/spec/lib/gitlab/regex_spec.rb +++ b/spec/lib/gitlab/regex_spec.rb @@ -968,4 +968,18 @@ RSpec.describe Gitlab::Regex do it { is_expected.not_to match('abc!abc') } it { is_expected.not_to match((['abc'] * 100).join('.') + '!') } end + + describe '.x509_subject_key_identifier_regex' do + subject { described_class.x509_subject_key_identifier_regex } + + it { is_expected.to match('AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB') } + it { is_expected.to match('CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD') } + it { is_expected.to match('79:FB:C1:E5:6B:53:8B:0A') } + it { is_expected.to match('79:fb:c1:e5:6b:53:8b:0a') } + + it { is_expected.not_to match('') } + it { is_expected.not_to match('CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:CD:GG') } + it { is_expected.not_to match('random string') } + it { is_expected.not_to match('12321342545356434523412341245452345623453542345234523453245') } + end end |