diff options
author | Brett Walker <bwalker@gitlab.com> | 2019-06-01 04:19:08 +0300 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2019-06-21 15:05:42 +0300 |
commit | 4a85e263b4afe2e1e64dcaf55856add6e7aed764 (patch) | |
tree | 91f9d823f7c1b3ecc45ae0b8c20bcd4bf8b69a42 /spec/services/issues/update_service_spec.rb | |
parent | 6fa900547dbd30b0db0070f87dbeb4b05d485b9b (diff) |
Add reorder action to Project IssuesController
to support manual sorting on the frontend
Diffstat (limited to 'spec/services/issues/update_service_spec.rb')
-rw-r--r-- | spec/services/issues/update_service_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb index 22f5607cb9c..28fa5d12d9c 100644 --- a/spec/services/issues/update_service_spec.rb +++ b/spec/services/issues/update_service_spec.rb @@ -687,6 +687,22 @@ describe Issues::UpdateService, :mailer do end end + context 'when moving an issue ', :nested_groups do + it 'raises an error for invalid move ids within a project' do + opts = { move_between_ids: [9000, 9999] } + + expect { described_class.new(issue.project, user, opts).execute(issue) } + .to raise_error(ActiveRecord::RecordNotFound) + end + + it 'raises an error for invalid move ids within a group' do + opts = { move_between_ids: [9000, 9999], board_group_id: create(:group).id } + + expect { described_class.new(issue.project, user, opts).execute(issue) } + .to raise_error(ActiveRecord::RecordNotFound) + end + end + include_examples 'issuable update service' do let(:open_issuable) { issue } let(:closed_issuable) { create(:closed_issue, project: project) } |