diff options
author | Douwe Maan <douwe@gitlab.com> | 2019-02-25 16:16:29 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2019-02-25 16:16:29 +0000 |
commit | 09adc0f69bcd96d74e18d000c63d40715be7b657 (patch) | |
tree | f57761cdf4e5ecfed5ea1f3e876419db2ac1a993 | |
parent | 5a0629b483017146eb568b4c6f2ce8397ed1db53 (diff) | |
parent | fdc928c7afeb7442359c95ee4a160dfaa1b79393 (diff) | |
download | gitlab-ce-09adc0f69bcd96d74e18d000c63d40715be7b657.tar.gz |
Merge branch '53655-board-milestone-fix' into 'master'
Port of
See merge request gitlab-org/gitlab-ce!23868
-rw-r--r-- | spec/support/shared_examples/services/boards/issues_move_service.rb | 16 |
1 files changed, 16 insertions, 0 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 ec44b99d10e..9dbd1d8e867 100644 --- a/spec/support/shared_examples/services/boards/issues_move_service.rb +++ b/spec/support/shared_examples/services/boards/issues_move_service.rb @@ -39,6 +39,22 @@ shared_examples 'issues move service' do |group| end end + context 'when moving to backlog' do + let(:milestone) { create(:milestone, project: project) } + let!(:backlog) { create(:backlog_list, board: board1) } + + let(:issue) { create(:labeled_issue, project: project, labels: [bug, development, testing, regression], milestone: milestone) } + let(:params) { { board_id: board1.id, from_list_id: list2.id, to_list_id: backlog.id } } + + it 'keeps labels and milestone' do + described_class.new(parent, user, params).execute(issue) + issue.reload + + expect(issue.labels).to contain_exactly(bug, regression) + expect(issue.milestone).to eq(milestone) + end + end + context 'when moving from closed' do let(:issue) { create(:labeled_issue, :closed, project: project, labels: [bug]) } let(:params) { { board_id: board1.id, from_list_id: closed.id, to_list_id: list2.id } } |