diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-03-23 09:39:37 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-03-23 09:41:39 +0100 |
commit | 915bfedfa75947d42d0a92e0c00494d43d676b43 (patch) | |
tree | b203ccbcbe5d63ead6eaf19ca7e596d39632e41b /spec/services | |
parent | d967b122a9dc32ac6fda2f89327463656650020b (diff) | |
download | gitlab-ce-915bfedfa75947d42d0a92e0c00494d43d676b43.tar.gz |
Do not allow to move issue if it has not been persistedmove-issue-section-should-not-be-displayed-in-the-new-issue-form-14489
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/issues/move_service_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/services/issues/move_service_spec.rb b/spec/services/issues/move_service_spec.rb index 14cc20e529a..ade3b7850f1 100644 --- a/spec/services/issues/move_service_spec.rb +++ b/spec/services/issues/move_service_spec.rb @@ -208,6 +208,12 @@ describe Issues::MoveService, services: true do it { expect { move }.to raise_error(StandardError, /permissions/) } end + + context 'issue is not persisted' do + include_context 'user can move issue' + let(:old_issue) { build(:issue, project: old_project, author: author) } + it { expect { move }.to raise_error(StandardError, /permissions/) } + end end end end |