diff options
Diffstat (limited to 'spec/services/system_notes/zoom_service_spec.rb')
-rw-r--r-- | spec/services/system_notes/zoom_service_spec.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/spec/services/system_notes/zoom_service_spec.rb b/spec/services/system_notes/zoom_service_spec.rb new file mode 100644 index 00000000000..435cdb5748e --- /dev/null +++ b/spec/services/system_notes/zoom_service_spec.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe ::SystemNotes::ZoomService do + let_it_be(:project) { create(:project, :repository) } + let_it_be(:author) { create(:user) } + + let(:noteable) { create(:issue, project: project) } + + let(:service) { described_class.new(noteable: noteable, project: project, author: author) } + + describe '#zoom_link_added' do + subject { service.zoom_link_added } + + it_behaves_like 'a system note' do + let(:action) { 'pinned_embed' } + end + + it 'sets the zoom link added note text' do + expect(subject.note).to eq('added a Zoom call to this issue') + end + end + + describe '#zoom_link_removed' do + subject { service.zoom_link_removed } + + it_behaves_like 'a system note' do + let(:action) { 'pinned_embed' } + end + + it 'sets the zoom link removed note text' do + expect(subject.note).to eq('removed a Zoom call from this issue') + end + end +end |