Fix broken spec in git_push_service_spec by stubbing an external issue tracker

This commit is contained in:
Stan Hu 2016-06-29 19:25:44 -07:00 committed by Yorick Peterse
parent a4ce2d126d
commit 4fca633a31
No known key found for this signature in database
GPG key ID: EDD30D2BEB691AC9

View file

@ -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