diff options
Diffstat (limited to 'spec/services/merge_requests/update_reviewers_service_spec.rb')
-rw-r--r-- | spec/services/merge_requests/update_reviewers_service_spec.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/spec/services/merge_requests/update_reviewers_service_spec.rb b/spec/services/merge_requests/update_reviewers_service_spec.rb index 96824ea6974..9f935e1cecf 100644 --- a/spec/services/merge_requests/update_reviewers_service_spec.rb +++ b/spec/services/merge_requests/update_reviewers_service_spec.rb @@ -128,10 +128,8 @@ RSpec.describe MergeRequests::UpdateReviewersService do set_reviewers end - it 'triggers graphql subscription mergeRequestReviewersUpdated' do - expect(GraphqlTriggers).to receive(:merge_request_reviewers_updated).with(merge_request) - - set_reviewers + it_behaves_like 'triggers GraphQL subscription mergeRequestReviewersUpdated' do + let(:action) { set_reviewers } end it 'calls MergeRequest::ResolveTodosService#async_execute' do @@ -158,10 +156,8 @@ RSpec.describe MergeRequests::UpdateReviewersService do context 'when reviewers did not change' do let(:opts) { { reviewer_ids: merge_request.reviewer_ids } } - it 'does not trigger graphql subscription mergeRequestReviewersUpdated' do - expect(GraphqlTriggers).not_to receive(:merge_request_reviewers_updated) - - set_reviewers + it_behaves_like 'does not trigger GraphQL subscription mergeRequestReviewersUpdated' do + let(:action) { set_reviewers } end end |