summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/services/users/destroy_service_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/services/users/destroy_service_spec.rb b/spec/services/users/destroy_service_spec.rb
index 76f1e625fda..f82d4b483e7 100644
--- a/spec/services/users/destroy_service_spec.rb
+++ b/spec/services/users/destroy_service_spec.rb
@@ -19,7 +19,9 @@ describe Users::DestroyService do
end
it 'will delete the project' do
- expect_any_instance_of(Projects::DestroyService).to receive(:execute).once
+ expect_next_instance_of(Projects::DestroyService) do |destroy_service|
+ expect(destroy_service).to receive(:execute).once
+ end
service.execute(user)
end
@@ -32,7 +34,9 @@ describe Users::DestroyService do
end
it 'destroys a project in pending_delete' do
- expect_any_instance_of(Projects::DestroyService).to receive(:execute).once
+ expect_next_instance_of(Projects::DestroyService) do |destroy_service|
+ expect(destroy_service).to receive(:execute).once
+ end
service.execute(user)