Skip to content
Snippets Groups Projects

Add a Tag Name filter to the Incident Timeline API

7 unresolved threads
1 file
+ 2
12
Compare changes
  • Side-by-side
  • Inline
@@ -64,8 +64,6 @@
end
describe '.with_tag_name' do
let(:tag_name) { nil }
let_it_be(:timeline_event_with_tag) do
create(:incident_management_timeline_event, project: project, incident: incident)
end
@@ -80,16 +78,8 @@
timeline_event_tag: timeline_event_tag)
end
subject { described_class.with_tag_name(tag_name: tag_name) }
context 'without tag name filter' do
it { is_expected.to match_array([timeline_event, timeline_event_with_tag]) }
end
context 'with tag name filter' do
let(:tag_name) { 'Start time' } # The default tag name, as specified in the factory
it { is_expected.to match_array([timeline_event_with_tag]) }
it 'returns the correct event when filtering with a tag name' do
expect(described_class.with_tag_name('Start time')).to match_array([timeline_event_with_tag])
end
end
Loading