diff options
author | Rémy Coutable <remy@rymai.me> | 2017-07-04 17:19:59 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-07-04 17:19:59 +0000 |
commit | b036d50ca1cf5f5c105b84b7c1f622bf2483828d (patch) | |
tree | 3582e3583b93002f9feb1d9a61a2b58aba46baa5 /spec/models | |
parent | 58990f1b7f86f3ab18ab6fb20dfa664179e3d738 (diff) | |
parent | f6314bdba5feff48a68e0323744ac635220ff635 (diff) | |
download | gitlab-ce-b036d50ca1cf5f5c105b84b7c1f622bf2483828d.tar.gz |
Merge branch 'feature/no-hypen-at-end-of-commit-ref-slug' into 'master'
no trailing / leading hyphens in CI_COMMIT_REF_SLUG.
Closes #32035
See merge request !11218
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/ci/build_spec.rb | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 488697f74eb..7de5e2e3920 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -998,13 +998,17 @@ describe Ci::Build, :models do describe '#ref_slug' do { - 'master' => 'master', - '1-foo' => '1-foo', - 'fix/1-foo' => 'fix-1-foo', - 'fix-1-foo' => 'fix-1-foo', - 'a' * 63 => 'a' * 63, - 'a' * 64 => 'a' * 63, - 'FOO' => 'foo' + 'master' => 'master', + '1-foo' => '1-foo', + 'fix/1-foo' => 'fix-1-foo', + 'fix-1-foo' => 'fix-1-foo', + 'a' * 63 => 'a' * 63, + 'a' * 64 => 'a' * 63, + 'FOO' => 'foo', + '-' + 'a' * 61 + '-' => 'a' * 61, + '-' + 'a' * 62 + '-' => 'a' * 62, + '-' + 'a' * 63 + '-' => 'a' * 62, + 'a' * 62 + ' ' => 'a' * 62 }.each do |ref, slug| it "transforms #{ref} to #{slug}" do build.ref = ref |