Skip to content
Snippets Groups Projects
Commit e3ba6d9c authored by Can Eldem's avatar Can Eldem Committed by Igor Drozdov
Browse files

Skip filtering by domain if iid is given

parent bd0dab96
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -32,6 +32,8 @@ def execute
attr_reader :current_user, :project, :params
 
def by_domain(collection)
return collection if params[:iid].present?
collection.with_operations_alerts
end
 
Loading
Loading
Loading
Loading
@@ -42,6 +42,12 @@
 
it { is_expected.to contain_exactly(resolved_alert, ignored_alert) }
end
context 'skips domain if iid is given' do
let(:params) { { iid: resolved_alert.iid, domain: 'threat_monitoring' } }
it { is_expected.to contain_exactly(resolved_alert) }
end
end
 
context 'empty params' do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment