Skip to content
Snippets Groups Projects
Commit 17ac37dd authored by Igor Drozdov's avatar Igor Drozdov
Browse files

Merge branch 'add-domain-for-alert-mutations' into 'master'

Skip filtering by domain if iid is given

See merge request gitlab-org/gitlab!50208
parents 6faf202f e3ba6d9c
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