diff options
author | Stan Hu <stanhu@gmail.com> | 2015-06-12 08:39:50 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-06-12 16:59:27 +0300 |
commit | d45112258e066da307975c17c5ca19ea9a17222b (patch) | |
tree | ff77b6428f81f9d97f330c821eb8b46a4389386b /spec/services/git_push_service_spec.rb | |
parent | 4e98159022c99d3fd857fc35015547fd93d830be (diff) |
Fix post-receive errors on a push when an external issue tracker is configured
Closes #1700
Closes #1720
Diffstat (limited to 'spec/services/git_push_service_spec.rb')
-rw-r--r-- | spec/services/git_push_service_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/services/git_push_service_spec.rb b/spec/services/git_push_service_spec.rb index e7558f28768..d0941fa2e07 100644 --- a/spec/services/git_push_service_spec.rb +++ b/spec/services/git_push_service_spec.rb @@ -233,6 +233,15 @@ describe GitPushService do expect(Issue.find(issue.id)).to be_opened end + + it "doesn't close issues when external issue tracker is in use" do + allow(project).to receive(:default_issues_tracker?).and_return(false) + + # The push still shouldn't create cross-reference notes. + expect { + service.execute(project, user, @oldrev, @newrev, 'refs/heads/hurf') + }.not_to change { Note.where(project_id: project.id, system: true).count } + end end describe "empty project" do |