Rename unfinished trait to open
So now it's more consistent with the name we use in the rest of the code.
This commit is contained in:
@@ -121,7 +121,7 @@ FactoryBot.define do
|
|||||||
valuation_finished { true }
|
valuation_finished { true }
|
||||||
end
|
end
|
||||||
|
|
||||||
trait :unfinished do
|
trait :open do
|
||||||
valuation_finished { false }
|
valuation_finished { false }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ describe "Admin budget investments" do
|
|||||||
valuator = create(:valuator, user: user)
|
valuator = create(:valuator, user: user)
|
||||||
create(:budget_investment,
|
create(:budget_investment,
|
||||||
:with_administrator,
|
:with_administrator,
|
||||||
:unfinished,
|
:open,
|
||||||
title: "Investment without valuation",
|
title: "Investment without valuation",
|
||||||
budget: budget,
|
budget: budget,
|
||||||
valuators: [valuator])
|
valuators: [valuator])
|
||||||
|
|||||||
@@ -1259,7 +1259,7 @@ describe "Budget Investments" do
|
|||||||
scenario "Show (unfeasible budget investment with valuation not finished)" do
|
scenario "Show (unfeasible budget investment with valuation not finished)" do
|
||||||
investment = create(:budget_investment,
|
investment = create(:budget_investment,
|
||||||
:unfeasible,
|
:unfeasible,
|
||||||
:unfinished,
|
:open,
|
||||||
budget: budget,
|
budget: budget,
|
||||||
heading: heading,
|
heading: heading,
|
||||||
unfeasibility_explanation: "Local government is not competent in this matter")
|
unfeasibility_explanation: "Local government is not competent in this matter")
|
||||||
|
|||||||
@@ -1152,7 +1152,7 @@ describe Budget::Investment do
|
|||||||
describe "with under_valuation filter" do
|
describe "with under_valuation filter" do
|
||||||
let(:params) { { advanced_filters: ["under_valuation"], budget_id: budget.id } }
|
let(:params) { { advanced_filters: ["under_valuation"], budget_id: budget.id } }
|
||||||
it "returns only investment under valuation" do
|
it "returns only investment under valuation" do
|
||||||
investment1 = create(:budget_investment, :with_administrator, :unfinished, :with_valuator,
|
investment1 = create(:budget_investment, :with_administrator, :open, :with_valuator,
|
||||||
budget: budget)
|
budget: budget)
|
||||||
create(:budget_investment, :with_administrator, budget: budget)
|
create(:budget_investment, :with_administrator, budget: budget)
|
||||||
create(:budget_investment, budget: budget)
|
create(:budget_investment, budget: budget)
|
||||||
|
|||||||
Reference in New Issue
Block a user