Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolis Mavrofidis <mavrofidise@gmail.com>2017-08-09 18:37:06 +0300
committermanolis <mavrofidise@gmail.com>2017-08-31 23:30:36 +0300
commit7e71f958ac721f5c36c20a5366c1e46adce4c67d (patch)
tree63b74b20bdb22d42afcd82764fdf97f01d8c655a /spec/services/issues/update_service_spec.rb
parent420d835e5fb41e1c3291a814f807b555b24646ca (diff)
/move project functionality. Squash commit.
Update to add all issues to be updated. Added functionality, proper tests, documentation and changelog.
Diffstat (limited to 'spec/services/issues/update_service_spec.rb')
-rw-r--r--spec/services/issues/update_service_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb
index 34fb16edc84..2176469aba6 100644
--- a/spec/services/issues/update_service_spec.rb
+++ b/spec/services/issues/update_service_spec.rb
@@ -510,6 +510,26 @@ describe Issues::UpdateService, :mailer do
end
end
+ context 'move issue to another project' do
+ let(:target_project) { create(:project) }
+
+ context 'valid project' do
+ before do
+ target_project.team << [user, :master]
+ end
+
+ it 'calls the move service with the proper issue and project' do
+ move_stub = class_double("Issues::MoveService").as_stubbed_const
+ allow(Issues::MoveService).to receive(:new).and_return(move_stub)
+ allow(move_stub).to receive(:execute).with(issue, target_project).and_return(issue)
+
+ expect(move_stub).to receive(:execute).with(issue, target_project)
+
+ update_issue(target_project: target_project)
+ end
+ end
+ end
+
include_examples 'issuable update service' do
let(:open_issuable) { issue }
let(:closed_issuable) { create(:closed_issue, project: project) }