summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/models/synthetic_note_shared_examples.rb
blob: 12e865b13123c8967834012a99ea7fc948051b5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

RSpec.shared_examples 'a synthetic note' do |action|
  it_behaves_like 'a system note', exclude_project: true, skip_persistence_check: true do
    let(:action) { action }
  end

  describe '#discussion_id' do
    before do
      allow(event).to receive(:discussion_id).and_return('foobar42')
    end

    it 'returns the expected discussion id' do
      expect(subject.discussion_id(nil)).to eq('foobar42')
    end
  end
end