Add specs checking keeping milestones
This commit is contained in:
parent
b9f0eff9fc
commit
fdc928c7af
1 changed files with 16 additions and 0 deletions
|
@ -39,6 +39,22 @@ shared_examples 'issues move service' do |group|
|
||||||
end
|
end
|
||||||
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
|
context 'when moving from closed' do
|
||||||
let(:issue) { create(:labeled_issue, :closed, project: project, labels: [bug]) }
|
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 } }
|
let(:params) { { board_id: board1.id, from_list_id: closed.id, to_list_id: list2.id } }
|
||||||
|
|
Loading…
Reference in a new issue