Skip to content
Snippets Groups Projects

Add a Tag Name filter to the Incident Timeline API

7 unresolved threads
1 file
+ 18
0
Compare changes
  • Side-by-side
  • Inline
@@ -20,6 +20,16 @@
create(:incident_management_timeline_event, project: project, incident: another_incident)
end
let_it_be(:timeline_event_tag) do
create(:incident_management_timeline_event_tag, project: project, name: 'Start time')
end
let_it_be(:timeline_event_tag_link) do
create(:incident_management_timeline_event_tag_link,
timeline_event: timeline_event2,
timeline_event_tag: timeline_event_tag)
end
let(:params) { {} }
describe '#execute' do
@@ -42,6 +52,14 @@
end
end
context 'when filtering by Tag Name' do
let(:params) { { tag_name: "Start time" } }
it 'returns only matched timeline event' do
is_expected.to contain_exactly(timeline_event2)
end
end
context 'when incident is nil' do
let_it_be(:incident) { nil }
Loading