Commit 5e7565eb authored by Markus Koller's avatar Markus Koller

Merge branch 'pl-rubocop-inline-association-prometheus-alert' into 'master'

Fix cop FactoryBot/InlineAssociation for prometheus_alert

See merge request gitlab-org/gitlab!45526
parents f2bdc5cd bf7eaae6
...@@ -1328,7 +1328,6 @@ FactoryBot/InlineAssociation: ...@@ -1328,7 +1328,6 @@ FactoryBot/InlineAssociation:
- 'spec/factories/notes.rb' - 'spec/factories/notes.rb'
- 'spec/factories/packages.rb' - 'spec/factories/packages.rb'
- 'spec/factories/packages/package_file.rb' - 'spec/factories/packages/package_file.rb'
- 'spec/factories/prometheus_alert.rb'
- 'spec/factories/resource_label_events.rb' - 'spec/factories/resource_label_events.rb'
- 'spec/factories/resource_milestone_event.rb' - 'spec/factories/resource_milestone_event.rb'
- 'spec/factories/resource_state_event.rb' - 'spec/factories/resource_state_event.rb'
......
...@@ -7,11 +7,11 @@ FactoryBot.define do ...@@ -7,11 +7,11 @@ FactoryBot.define do
threshold { 1 } threshold { 1 }
environment do |alert| environment do |alert|
build(:environment, project: alert.project) association(:environment, project: alert.project)
end end
prometheus_metric do |alert| prometheus_metric do |alert|
build(:prometheus_metric, project: alert.project) association(:prometheus_metric, project: alert.project)
end end
trait :with_runbook_url do trait :with_runbook_url do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment