diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2017-01-31 11:41:51 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2017-01-31 11:41:51 +0000 |
commit | 810979f02b72f68b805b2e0c4a067b36e77334b6 (patch) | |
tree | 74a1a5cc7d6887851d06ef5a44aa5afdbdf9d565 /spec/models/environment_spec.rb | |
parent | e4bcdddfa79d855e7f320a8d91e79e17d2e1bf5f (diff) | |
parent | e806bdaf6c3c212a711b5f573ca6bc97ffd50a80 (diff) | |
download | gitlab-ce-810979f02b72f68b805b2e0c4a067b36e77334b6.tar.gz |
Merge branch '26852-fix-slug-for-openshift' into 'master'
Avoid repeated dashes in $CI_ENVIRONMENT_SLUG
Closes #26852
See merge request !8638
Diffstat (limited to 'spec/models/environment_spec.rb')
-rw-r--r-- | spec/models/environment_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb index b2e06541e66..eba392044bf 100644 --- a/spec/models/environment_spec.rb +++ b/spec/models/environment_spec.rb @@ -288,6 +288,11 @@ describe Environment, models: true do "1-foo" => "env-1-foo" + SUFFIX, "1/foo" => "env-1-foo" + SUFFIX, "foo-" => "foo" + SUFFIX, + "foo--bar" => "foo-bar" + SUFFIX, + "foo**bar" => "foo-bar" + SUFFIX, + "*-foo" => "env-foo" + SUFFIX, + "staging-12345678-" => "staging-12345678" + SUFFIX, + "staging-12345678-01234567" => "staging-12345678" + SUFFIX, }.each do |name, matcher| it "returns a slug matching #{matcher}, given #{name}" do slug = described_class.new(name: name).generate_slug |