summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-03-23 09:39:37 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-03-23 09:41:39 +0100
commit915bfedfa75947d42d0a92e0c00494d43d676b43 (patch)
treeb203ccbcbe5d63ead6eaf19ca7e596d39632e41b /spec/services
parentd967b122a9dc32ac6fda2f89327463656650020b (diff)
downloadgitlab-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.rb6
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