Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2017-04-24 19:26:23 +0300
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-05-04 22:03:47 +0300
commit29519edb55f17d0e7de5dfb289085c894b4d2826 (patch)
tree65377c9c9a98f36bfe07f564b4731380fe063452 /spec/lib/gitlab/cycle_analytics
parent020295fffc2329b7852c2739082986fd6b569d9e (diff)
Cycle analytics specs needed Commit to reference issue
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/lib/gitlab/cycle_analytics')
-rw-r--r--spec/lib/gitlab/cycle_analytics/events_spec.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/spec/lib/gitlab/cycle_analytics/events_spec.rb b/spec/lib/gitlab/cycle_analytics/events_spec.rb
index 9d2ba481919..0d56bdd0ebd 100644
--- a/spec/lib/gitlab/cycle_analytics/events_spec.rb
+++ b/spec/lib/gitlab/cycle_analytics/events_spec.rb
@@ -11,8 +11,6 @@ describe 'cycle analytics events' do
end
before do
- allow_any_instance_of(Gitlab::ReferenceExtractor).to receive(:issues).and_return([context])
-
setup(context)
end
@@ -332,7 +330,7 @@ describe 'cycle analytics events' do
def setup(context)
milestone = create(:milestone, project: project)
context.update(milestone: milestone)
- mr = create_merge_request_closing_issue(context)
+ mr = create_merge_request_closing_issue(context, commit_message: "References #{context.to_reference}")
ProcessCommitWorker.new.perform(project.id, user.id, mr.commits.last.to_hash)
end