diff options
Diffstat (limited to 'spec/services/system_note_service_spec.rb')
-rw-r--r-- | spec/services/system_note_service_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index f3e6cb3cc52..66f9b5d092f 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -6,6 +6,7 @@ describe SystemNoteService do include Gitlab::Routing include RepoHelpers include AssetsHelpers + include DesignManagementTestHelpers let_it_be(:group) { create(:group) } let_it_be(:project) { create(:project, :repository, group: group) } @@ -636,4 +637,28 @@ describe SystemNoteService do described_class.auto_resolve_prometheus_alert(noteable, project, author) end end + + describe '.design_version_added' do + let(:version) { create(:design_version) } + + it 'calls DesignManagementService' do + expect_next_instance_of(SystemNotes::DesignManagementService) do |service| + expect(service).to receive(:design_version_added).with(version) + end + + described_class.design_version_added(version) + end + end + + describe '.design_discussion_added' do + let(:discussion_note) { create(:diff_note_on_design) } + + it 'calls DesignManagementService' do + expect_next_instance_of(SystemNotes::DesignManagementService) do |service| + expect(service).to receive(:design_discussion_added).with(discussion_note) + end + + described_class.design_discussion_added(discussion_note) + end + end end |