Commit 49f977d675b44b6aae0f491fbbf86dd1ee05eb64
1 parent
928fbeee
Exists in
spb-stable
and in
3 other branches
Fix tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
5 changed files
with
5 additions
and
11 deletions
Show diff stats
app/services/issues/close_service.rb
app/services/issues/create_service.rb
app/services/issues/reopen_service.rb
app/services/issues/update_service.rb
spec/services/git_push_service_spec.rb
| ... | ... | @@ -170,16 +170,10 @@ describe GitPushService do |
| 170 | 170 | Issue.find(issue.id).should be_closed |
| 171 | 171 | end |
| 172 | 172 | |
| 173 | - it "passes the closing commit as a thread-local" do | |
| 174 | - service.execute(project, user, @oldrev, @newrev, @ref) | |
| 175 | - | |
| 176 | - Thread.current[:current_commit].should == closing_commit | |
| 177 | - end | |
| 178 | - | |
| 179 | 173 | it "doesn't create cross-reference notes for a closing reference" do |
| 180 | 174 | expect { |
| 181 | 175 | service.execute(project, user, @oldrev, @newrev, @ref) |
| 182 | - }.not_to change { Note.where(project_id: project.id, system: true).count } | |
| 176 | + }.not_to change { Note.where(project_id: project.id, system: true, commit_id: closing_commit.id).count } | |
| 183 | 177 | end |
| 184 | 178 | |
| 185 | 179 | it "doesn't close issues when pushed to non-default branches" do | ... | ... |