diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-04-24 17:26:23 +0100 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-05-04 20:03:47 +0100 |
commit | 29519edb55f17d0e7de5dfb289085c894b4d2826 (patch) | |
tree | 65377c9c9a98f36bfe07f564b4731380fe063452 /spec/requests | |
parent | 020295fffc2329b7852c2739082986fd6b569d9e (diff) | |
download | gitlab-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/requests')
-rw-r--r-- | spec/requests/projects/cycle_analytics_events_spec.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/spec/requests/projects/cycle_analytics_events_spec.rb b/spec/requests/projects/cycle_analytics_events_spec.rb index 0edbffbcd3b..c2f8f33447d 100644 --- a/spec/requests/projects/cycle_analytics_events_spec.rb +++ b/spec/requests/projects/cycle_analytics_events_spec.rb @@ -11,8 +11,6 @@ describe 'cycle analytics events' do before do project.team << [user, :developer] - allow_any_instance_of(Gitlab::ReferenceExtractor).to receive(:issues).and_return([issue]) - 3.times do |count| Timecop.freeze(Time.now + count.days) do create_cycle @@ -123,7 +121,7 @@ describe 'cycle analytics events' do def create_cycle milestone = create(:milestone, project: project) issue.update(milestone: milestone) - mr = create_merge_request_closing_issue(issue) + mr = create_merge_request_closing_issue(issue, commit_message: "References #{issue.to_reference}") pipeline = create(:ci_empty_pipeline, status: 'created', project: project, ref: mr.source_branch, sha: mr.source_branch_sha) pipeline.run |