summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-03-09 13:49:05 +0100
committerYorick Peterse <yorickpeterse@gmail.com>2016-03-09 17:10:43 +0100
commit96d35c5975fe8c5ff0a6306b8da5a623cfcb47b6 (patch)
tree4b4caa2ed670f2f5bc28e7b18bf55b34c8707084
parent5956ddd8b2a633bd9ff1664bcad74e2d17eeebd0 (diff)
downloadgitlab-ce-96d35c5975fe8c5ff0a6306b8da5a623cfcb47b6.tar.gz
Fixed part of the GitPushService specs
These were broken by commit 21a05328ffd5cb9130ae516faa7dd672cacba90c. Two JIRA tests remain broken but I can't quite figure out how to fix them.
-rw-r--r--spec/services/git_push_service_spec.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/services/git_push_service_spec.rb b/spec/services/git_push_service_spec.rb
index f5c51e46e8b..7fee16a0586 100644
--- a/spec/services/git_push_service_spec.rb
+++ b/spec/services/git_push_service_spec.rb
@@ -271,22 +271,24 @@ describe GitPushService, services: true do
allow(project.repository).to receive(:commits_between).
and_return([closing_commit])
+
+ project.team << [commit_author, :master]
end
context "to default branches" do
it "closes issues" do
- execute_service(project, user, @oldrev, @newrev, @ref )
+ execute_service(project, commit_author, @oldrev, @newrev, @ref )
expect(Issue.find(issue.id)).to be_closed
end
it "adds a note indicating that the issue is now closed" do
expect(SystemNoteService).to receive(:change_status).with(issue, project, commit_author, "closed", closing_commit)
- execute_service(project, user, @oldrev, @newrev, @ref )
+ execute_service(project, commit_author, @oldrev, @newrev, @ref )
end
it "doesn't create additional cross-reference notes" do
expect(SystemNoteService).not_to receive(:cross_reference)
- execute_service(project, user, @oldrev, @newrev, @ref )
+ execute_service(project, commit_author, @oldrev, @newrev, @ref )
end
it "doesn't close issues when external issue tracker is in use" do
@@ -294,7 +296,7 @@ describe GitPushService, services: true do
# The push still shouldn't create cross-reference notes.
expect do
- execute_service(project, user, @oldrev, @newrev, 'refs/heads/hurf' )
+ execute_service(project, commit_author, @oldrev, @newrev, 'refs/heads/hurf' )
end.not_to change { Note.where(project_id: project.id, system: true).count }
end
end
@@ -316,7 +318,6 @@ describe GitPushService, services: true do
end
end
- # EE-only tests
context "for jira issue tracker" do
include JiraServiceHelper