diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-03-07 01:06:44 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-03-07 01:06:44 +0000 |
commit | 3cf4359b00d13959741e8c4909112c21b021c86c (patch) | |
tree | d492de8066f15fe1767045db11f7eacb4feaee47 /spec | |
parent | e68ad7fbb83d1b2799d3672791d723adfd494219 (diff) | |
parent | b673d87227867f6d142ee6e615c750a600661c6b (diff) | |
download | gitlab-ce-3cf4359b00d13959741e8c4909112c21b021c86c.tar.gz |
Merge branch 'mass-change-comments' into 'master'
Send notifications and leave system comments when bulk updating issues.
Resolves https://dev.gitlab.org/gitlab/gitlabhq/issues/1885.
See merge request !1646
Diffstat (limited to 'spec')
-rw-r--r-- | spec/services/issues/bulk_update_service_spec.rb | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/spec/services/issues/bulk_update_service_spec.rb b/spec/services/issues/bulk_update_service_spec.rb index 504213e667f..a97c55011c9 100644 --- a/spec/services/issues/bulk_update_service_spec.rb +++ b/spec/services/issues/bulk_update_service_spec.rb @@ -21,10 +21,8 @@ describe Issues::BulkUpdateService do create(:issue, project: @project) end @params = { - update: { - status: 'closed', - issues_ids: @issues.map(&:id) - } + state_event: 'close', + issues_ids: @issues.map(&:id) } end @@ -46,10 +44,8 @@ describe Issues::BulkUpdateService do create(:closed_issue, project: @project) end @params = { - update: { - status: 'reopen', - issues_ids: @issues.map(&:id) - } + state_event: 'reopen', + issues_ids: @issues.map(&:id) } end @@ -69,10 +65,8 @@ describe Issues::BulkUpdateService do before do @new_assignee = create :user @params = { - update: { - issues_ids: [issue.id], - assignee_id: @new_assignee.id - } + issues_ids: [issue.id], + assignee_id: @new_assignee.id } end @@ -88,7 +82,7 @@ describe Issues::BulkUpdateService do @project.issues.first.update_attribute(:assignee, @new_assignee) expect(@project.issues.first.assignee).not_to be_nil - @params[:update][:assignee_id] = -1 + @params[:assignee_id] = -1 Issues::BulkUpdateService.new(@project, @user, @params).execute expect(@project.issues.first.assignee).to be_nil @@ -98,7 +92,7 @@ describe Issues::BulkUpdateService do @project.issues.first.update_attribute(:assignee, @new_assignee) expect(@project.issues.first.assignee).not_to be_nil - @params[:update][:assignee_id] = '' + @params[:assignee_id] = '' Issues::BulkUpdateService.new(@project, @user, @params).execute expect(@project.issues.first.assignee).not_to be_nil @@ -110,10 +104,8 @@ describe Issues::BulkUpdateService do before do @milestone = create :milestone @params = { - update: { - issues_ids: [issue.id], - milestone_id: @milestone.id - } + issues_ids: [issue.id], + milestone_id: @milestone.id } end |