diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-08-17 17:50:22 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-08-17 18:58:59 +0300 |
commit | a8cc69a2816f3d241aa6d1471cb7e3c8d44c8624 (patch) | |
tree | 0592cb61fef54a64b88d37fbf4efff666b5d21c6 /spec/services/boards | |
parent | 997e77e74a86241defcfb22a40118df7ec8f7493 (diff) |
Validate if the lists are different when moving issues between lists
Diffstat (limited to 'spec/services/boards')
-rw-r--r-- | spec/services/boards/issues/move_service_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/services/boards/issues/move_service_spec.rb b/spec/services/boards/issues/move_service_spec.rb index 65f2247918f..0122159cab8 100644 --- a/spec/services/boards/issues/move_service_spec.rb +++ b/spec/services/boards/issues/move_service_spec.rb @@ -121,5 +121,20 @@ describe Boards::Issues::MoveService, services: true do expect(issue).to be_reopened end end + + context 'when moving to same list' do + let(:issue) { create(:labeled_issue, project: project, labels: [bug, development]) } + let(:params) { { from_list_id: list1.id, to_list_id: list1.id } } + + it 'returns false' do + expect(described_class.new(project, user, params).execute(issue)).to eq false + end + + it 'keeps issues labels' do + described_class.new(project, user, params).execute(issue) + + expect(issue.reload.labels).to contain_exactly(bug, development) + end + end end end |