Welcome to mirror list, hosted at ThFree Co, Russian Federation.

synthetic_note_shared_examples.rb « models « shared_examples « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a41ade2950a61de0a34bdf33e02ce267eaf0626f (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 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