diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-24 00:14:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-24 00:14:11 +0000 |
commit | f70958a8932f70733e08ee1774edd28423bac59e (patch) | |
tree | 255c18df6d34de3972d4b53f1916fab05fb6f228 /spec/services/issues | |
parent | 0978fc4c40151a0dccbcb3d348969a6920a58e09 (diff) | |
download | gitlab-ce-f70958a8932f70733e08ee1774edd28423bac59e.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/issues')
-rw-r--r-- | spec/services/issues/update_service_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb index 8a2e9ed74f7..2cc3d50f290 100644 --- a/spec/services/issues/update_service_spec.rb +++ b/spec/services/issues/update_service_spec.rb @@ -495,6 +495,32 @@ RSpec.describe Issues::UpdateService, :mailer do expect(note.note).to eq('changed the description') end + + it 'triggers GraphQL description updated subscription' do + expect(GraphqlTriggers).to receive(:issuable_description_updated).with(issue).and_call_original + + update_issue(description: 'Changed description') + end + + context 'when broadcast_issuable_description_updated is disabled' do + before do + stub_feature_flags(broadcast_issuable_description_updated: false) + end + + it 'does not trigger GraphQL description updated subscription' do + expect(GraphqlTriggers).not_to receive(:issuable_description_updated) + + update_issue(title: 'Changed title') + end + end + end + + context 'when decription is not changed' do + it 'does not trigger GraphQL description updated subscription' do + expect(GraphqlTriggers).not_to receive(:issuable_description_updated) + + update_issue(title: 'Changed title') + end end context 'when issue turns confidential' do |