diff --git a/spec/system/advanced_search_spec.rb b/spec/system/advanced_search_spec.rb index cb95cfc6a..12517920d 100644 --- a/spec/system/advanced_search_spec.rb +++ b/spec/system/advanced_search_spec.rb @@ -197,9 +197,13 @@ describe "Advanced search" do Setting["feature.sdg"] = true Setting["sdg.process.budgets"] = true - create(:budget_investment, heading: heading, title: "Get Schwifty", sdg_goals: [SDG::Goal[7]], created_at: 1.minute.ago) - create(:budget_investment, heading: heading, title: "Hello Schwifty", sdg_goals: [SDG::Goal[7]], created_at: 2.days.ago) - create(:budget_investment, heading: heading, title: "Save the forest") + [ + { title: "Get Schwifty", sdg_goals: [SDG::Goal[7]], created_at: 1.minute.ago }, + { title: "Hello Schwifty", sdg_goals: [SDG::Goal[7]], created_at: 2.days.ago }, + { title: "Save the forest" } + ].each do |attributes| + create(:budget_investment, attributes.merge(heading: heading)) + end visit budget_investments_path(budget)