diff options
author | Dennis Tang <dtang@gitlab.com> | 2018-05-26 00:56:17 +0300 |
---|---|---|
committer | Dennis Tang <dtang@gitlab.com> | 2018-05-26 00:56:17 +0300 |
commit | 95a63a881673533e3fd44243297d1a81e19396b6 (patch) | |
tree | 9a3190b813e2d599043394b30afaa5a5c8f8e565 /spec/workers | |
parent | 48e46f959716c8915f5b59d1314b5e5781f3cd8d (diff) | |
parent | 50c8ed2bf498c69d3d52ba1451274e3fbf438429 (diff) |
Merge remote-tracking branch 'origin/master' into 38759-fetch-available-parameters-directly-from-gke-when-creating-a-cluster
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/update_merge_requests_worker_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/workers/update_merge_requests_worker_spec.rb b/spec/workers/update_merge_requests_worker_spec.rb index 0fa19ac84bb..80137815d2b 100644 --- a/spec/workers/update_merge_requests_worker_spec.rb +++ b/spec/workers/update_merge_requests_worker_spec.rb @@ -18,8 +18,13 @@ describe UpdateMergeRequestsWorker do end it 'executes MergeRequests::RefreshService with expected values' do - expect(MergeRequests::RefreshService).to receive(:new).with(project, user).and_call_original - expect_any_instance_of(MergeRequests::RefreshService).to receive(:execute).with(oldrev, newrev, ref) + expect(MergeRequests::RefreshService).to receive(:new) + .with(project, user).and_wrap_original do |method, *args| + method.call(*args).tap do |refresh_service| + expect(refresh_service) + .to receive(:execute).with(oldrev, newrev, ref) + end + end perform end |