Simplify valuator filter tests in budgets

Doing so makes it possible to have shorter lines after applying the
Layout/RedundantLineBreak rule.
This commit is contained in:
Javi Martín
2021-08-11 19:37:28 +02:00
parent 65c9786db7
commit 5b00df0565

View File

@@ -262,15 +262,8 @@ describe "Admin budget investments", :admin do
end
scenario "Filtering by without assigned valuator" do
user = create(:user)
valuator = create(:valuator, user: user)
create(:budget_investment,
title: "Investment without valuator",
budget: budget)
create(:budget_investment,
title: "Investment with valuator",
budget: budget,
valuators: [valuator])
create(:budget_investment, title: "Investment without valuator", budget: budget)
create(:budget_investment, :with_valuator, title: "Investment with valuator", budget: budget)
visit admin_budget_budget_investments_path(budget_id: budget)
expect(page).to have_link("Investment without valuator")
@@ -293,14 +286,12 @@ describe "Admin budget investments", :admin do
end
scenario "Filtering by under valuation" do
user = create(:user)
valuator = create(:valuator, user: user)
create(:budget_investment,
:with_administrator,
:with_valuator,
:open,
title: "Investment without valuation",
budget: budget,
valuators: [valuator])
budget: budget)
create(:budget_investment,
:with_administrator,
title: "Investment with valuation",