Commit 0ea5d664 authored by Robert Speicher's avatar Robert Speicher

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

Use expect_next_instance_of to replace expect_any_instance_of

See merge request gitlab-org/gitlab-ce!20072
parents 3a9839a8 5de2035c
......@@ -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)
......
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