From 19e15ae244776d4d148e6a65a1443f94bb59398c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Wed, 6 Jul 2016 10:08:42 +0200 Subject: Use a more future-proof check for Note/LegacyDiffNote MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- spec/models/event_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec/models/event_spec.rb') diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb index 00925591a5e..6ac19756f15 100644 --- a/spec/models/event_spec.rb +++ b/spec/models/event_spec.rb @@ -55,8 +55,8 @@ describe Event, models: true do it { is_expected.to be_note } end - context 'merge request note event' do - let(:target) { create(:note_on_merge_request) } + context 'merge request diff note event' do + let(:target) { create(:note_on_merge_request_diff) } it { is_expected.to be_note } end @@ -129,10 +129,10 @@ describe Event, models: true do end end - context 'merge request note event' do + context 'merge request diff note event' do let(:project) { create(:project, :public) } let(:merge_request) { create(:merge_request, source_project: project, author: author, assignee: assignee) } - let(:note_on_merge_request) { create(:note_on_merge_request, noteable: merge_request, project: project) } + let(:note_on_merge_request) { create(:note_on_merge_request_diff, noteable: merge_request, project: project) } let(:target) { note_on_merge_request } it { expect(event.visible_to_user?(non_member)).to eq true } -- cgit v1.2.1