summaryrefslogtreecommitdiff
path: root/spec/features/cycle_analytics_spec.rb
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/features/cycle_analytics_spec.rb
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/features/cycle_analytics_spec.rb')
-rw-r--r--spec/features/cycle_analytics_spec.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/features/cycle_analytics_spec.rb b/spec/features/cycle_analytics_spec.rb
index 0648c89a5c7..46c3bc9992e 100644
--- a/spec/features/cycle_analytics_spec.rb
+++ b/spec/features/cycle_analytics_spec.rb
@@ -8,7 +8,7 @@ feature 'Cycle Analytics', feature: true, js: true do
let(:project) { create(:project) }
let(:issue) { create(:issue, project: project, created_at: 2.days.ago) }
let(:milestone) { create(:milestone, project: project) }
- let(:mr) { create_merge_request_closing_issue(issue) }
+ let(:mr) { create_merge_request_closing_issue(issue, commit_message: "References #{issue.to_reference}") }
let(:pipeline) { create(:ci_empty_pipeline, status: 'created', project: project, ref: mr.source_branch, sha: mr.source_branch_sha) }
context 'as an allowed user' do
@@ -34,7 +34,6 @@ feature 'Cycle Analytics', feature: true, js: true do
before do
project.team << [user, :master]
- allow_any_instance_of(Gitlab::ReferenceExtractor).to receive(:issues).and_return([issue])
create_cycle
deploy_master