From 4fca633a317eb065145d3cc687f62eabcb8e8af2 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Wed, 29 Jun 2016 19:25:44 -0700 Subject: [PATCH] Fix broken spec in git_push_service_spec by stubbing an external issue tracker --- spec/services/git_push_service_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/services/git_push_service_spec.rb b/spec/services/git_push_service_spec.rb index f99ad046f0d..cab9a03d83a 100644 --- a/spec/services/git_push_service_spec.rb +++ b/spec/services/git_push_service_spec.rb @@ -314,6 +314,8 @@ describe GitPushService, services: true do it "doesn't close issues when external issue tracker is in use" do allow_any_instance_of(Project).to receive(:default_issues_tracker?). and_return(false) + external_issue_tracker = double(title: 'My Tracker', issue_path: issue.iid) + allow_any_instance_of(Project).to receive(:external_issue_tracker).and_return(external_issue_tracker) # The push still shouldn't create cross-reference notes. expect do