diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2018-04-05 11:22:52 +0200 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2018-04-05 11:22:52 +0200 |
commit | 1bca36b66f65efd0ff1d358e3e569bc84806e959 (patch) | |
tree | 40b500bbda184cbe588e0a5f4835e3957c14407b /spec/support | |
parent | c48a9c73ebbf1e48852d42651382ff4b174b3728 (diff) | |
parent | 32d2206b01b97cdbd6cdc13b25d98c3d3db048c4 (diff) | |
download | gitlab-ce-1bca36b66f65efd0ff1d358e3e569bc84806e959.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared_examples/services/boards/issues_move_service.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/support/shared_examples/services/boards/issues_move_service.rb b/spec/support/shared_examples/services/boards/issues_move_service.rb index 4a4fbaa3a0e..737863ea411 100644 --- a/spec/support/shared_examples/services/boards/issues_move_service.rb +++ b/spec/support/shared_examples/services/boards/issues_move_service.rb @@ -1,4 +1,4 @@ -shared_examples 'issues move service' do +shared_examples 'issues move service' do |group| context 'when moving an issue between lists' do let(:issue) { create(:labeled_issue, project: project, labels: [bug, development]) } let(:params) { { board_id: board1.id, from_list_id: list1.id, to_list_id: list2.id } } @@ -83,5 +83,18 @@ shared_examples 'issues move service' do expect(issue.relative_position).to be_between(issue1.relative_position, issue2.relative_position) end + + if group + context 'when on a group board' do + it 'sends the board_group_id parameter' do + params.merge!(move_after_id: issue1.id, move_before_id: issue2.id) + + match_params = { move_between_ids: [issue1.id, issue2.id], board_group_id: parent.id } + expect(Issues::UpdateService).to receive(:new).with(issue.project, user, match_params).and_return(double(execute: build(:issue))) + + described_class.new(parent, user, params).execute(issue) + end + end + end end end |