summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorMark Chao <mchao@gitlab.com>2019-04-10 11:39:45 +0800
committerMark Chao <mchao@gitlab.com>2019-05-03 03:02:58 +0800
commitd8bddb16624f34600069bb5d3540960b25176381 (patch)
tree6e38172e12eb8d5a5c1645b30cccdda9f7f08809 /spec/features
parent74ac04a6aa7a9398ed908f47080e64ec40e0dee8 (diff)
downloadgitlab-ce-d8bddb16624f34600069bb5d3540960b25176381.tar.gz
Validate MR branch names
Prevents refspec as branch name, which would bypass branch protection when used in conjunction with rebase. HEAD seems to be a special case with lots of occurrence, so it is considered valid for now. Another special case is `refs/head/*`, which can be imported.
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/issuables/issuable_list_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/features/issuables/issuable_list_spec.rb b/spec/features/issuables/issuable_list_spec.rb
index 7b6e9cd66b2..225b858742d 100644
--- a/spec/features/issuables/issuable_list_spec.rb
+++ b/spec/features/issuables/issuable_list_spec.rb
@@ -76,7 +76,7 @@ describe 'issuable list' do
create(:issue, project: project, author: user)
else
create(:merge_request, source_project: project, source_branch: generate(:branch))
- source_branch = FFaker::Name.name
+ source_branch = FFaker::Lorem.characters(8)
pipeline = create(:ci_empty_pipeline, project: project, ref: source_branch, status: %w(running failed success).sample, sha: 'any')
create(:merge_request, title: FFaker::Lorem.sentence, source_project: project, source_branch: source_branch, head_pipeline: pipeline)
end