Commit 85674099 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'ee-unify-destroy_service_spec.rb' into 'master'

EE: Use expect_next_instance_of to replace expect_any_instance_of

See merge request gitlab-org/gitlab-ee!6223
parents e4516662 031b7010
......@@ -19,7 +19,9 @@ describe Users::DestroyService do
end
it 'will delete the project' do
expect_any_instance_of(EE::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(EE::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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment