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:
authorRobert Speicher <rspeicher@gmail.com>2021-01-20 22:34:23 +0300
committerRobert Speicher <rspeicher@gmail.com>2021-01-20 22:34:23 +0300
commit6438df3a1e0fb944485cebf07976160184697d72 (patch)
tree00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/lib/gitlab/uuid_spec.rb
parent42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff)
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/lib/gitlab/uuid_spec.rb')
-rw-r--r--spec/lib/gitlab/uuid_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/lib/gitlab/uuid_spec.rb b/spec/lib/gitlab/uuid_spec.rb
index a2e28f5a24d..44c1d30fce0 100644
--- a/spec/lib/gitlab/uuid_spec.rb
+++ b/spec/lib/gitlab/uuid_spec.rb
@@ -49,4 +49,23 @@ RSpec.describe Gitlab::UUID do
it { is_expected.to eq(production_proper_uuid) }
end
end
+
+ describe 'v5?' do
+ using RSpec::Parameterized::TableSyntax
+
+ where(:test_string, :is_uuid_v5) do
+ 'not even a uuid' | false
+ 'this-seems-like-a-uuid' | false
+ 'thislook-more-5lik-eava-liduuidbutno' | false
+ '9f470438-db0f-37b7-9ca9-1d47104c339a' | false
+ '9f470438-db0f-47b7-9ca9-1d47104c339a' | false
+ '9f470438-db0f-57b7-9ca9-1d47104c339a' | true
+ end
+
+ with_them do
+ subject { described_class.v5?(test_string) }
+
+ it { is_expected.to be(is_uuid_v5) }
+ end
+ end
end