summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2017-04-24 17:26:23 +0100
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-05-04 20:03:47 +0100
commit29519edb55f17d0e7de5dfb289085c894b4d2826 (patch)
tree65377c9c9a98f36bfe07f564b4731380fe063452 /spec/support
parent020295fffc2329b7852c2739082986fd6b569d9e (diff)
downloadgitlab-ce-29519edb55f17d0e7de5dfb289085c894b4d2826.tar.gz
Cycle analytics specs needed Commit to reference issue28359-skip-process-commit-worker-unless-issues-referenced
The plan stage both measures time taken and lists related commits. We test for commits being listed, so needed to actually mention the issue in them. An alternative would have been adding “allow_any_instance_of(Commit).to receive(:matches_cross_reference_regex?).and_return(true)” but this felt too coupled to implementation.
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/cycle_analytics_helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/cycle_analytics_helpers.rb b/spec/support/cycle_analytics_helpers.rb
index 8ad042f5e3b..66545127a44 100644
--- a/spec/support/cycle_analytics_helpers.rb
+++ b/spec/support/cycle_analytics_helpers.rb
@@ -20,7 +20,7 @@ module CycleAnalyticsHelpers
ref: 'refs/heads/master').execute
end
- def create_merge_request_closing_issue(issue, message: nil, source_branch: nil)
+ def create_merge_request_closing_issue(issue, message: nil, source_branch: nil, commit_message: 'commit message')
if !source_branch || project.repository.commit(source_branch).blank?
source_branch = generate(:branch)
project.repository.add_branch(user, source_branch, 'master')
@@ -30,7 +30,7 @@ module CycleAnalyticsHelpers
user,
generate(:branch),
'content',
- message: 'commit message',
+ message: commit_message,
branch_name: source_branch)
project.repository.commit(sha)