Add invisible_to_valuators trait to investments
Now the code is symmetrical since we also use `visible_to_valuators`.
This commit is contained in:
@@ -129,6 +129,10 @@ FactoryBot.define do
|
|||||||
visible_to_valuators { true }
|
visible_to_valuators { true }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
trait :invisible_to_valuators do
|
||||||
|
visible_to_valuators { false }
|
||||||
|
end
|
||||||
|
|
||||||
trait :incompatible do
|
trait :incompatible do
|
||||||
selected
|
selected
|
||||||
incompatible { true }
|
incompatible { true }
|
||||||
|
|||||||
@@ -1659,8 +1659,8 @@ describe "Admin budget investments" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
scenario "Showing the valuating checkbox" do
|
scenario "Showing the valuating checkbox" do
|
||||||
investment1 = create(:budget_investment, :with_administrator, budget: budget, visible_to_valuators: true)
|
investment1 = create(:budget_investment, :with_administrator, :visible_to_valuators, budget: budget)
|
||||||
investment2 = create(:budget_investment, :with_administrator, budget: budget, visible_to_valuators: false)
|
investment2 = create(:budget_investment, :with_administrator, :invisible_to_valuators, budget: budget)
|
||||||
|
|
||||||
investment1.valuators << create(:valuator)
|
investment1.valuators << create(:valuator)
|
||||||
investment2.valuators << create(:valuator)
|
investment2.valuators << create(:valuator)
|
||||||
@@ -1737,8 +1737,8 @@ describe "Admin budget investments" do
|
|||||||
let!(:investment) do
|
let!(:investment) do
|
||||||
create(:budget_investment,
|
create(:budget_investment,
|
||||||
:winner,
|
:winner,
|
||||||
|
:visible_to_valuators,
|
||||||
budget: budget,
|
budget: budget,
|
||||||
visible_to_valuators: true,
|
|
||||||
author: create(:user, username: "Jon Doe")
|
author: create(:user, username: "Jon Doe")
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user