Add budget investment factory to fix failing scenario
Changes introduced in commits 41f66fa and dc87b75 will render the 'See results' button under `admin/budget_investments` only if a finished budget has winner investments associated with it
This commit is contained in:
@@ -541,21 +541,18 @@ feature 'Admin budget investments' do
|
||||
end
|
||||
|
||||
scenario "See results button appears when budget status is finished" do
|
||||
|
||||
finished_budget = create(:budget, :finished)
|
||||
create(:budget_investment, :winner, budget: finished_budget, title: "Winner project")
|
||||
|
||||
visit admin_budget_budget_investments_path(budget_id: finished_budget.id)
|
||||
expect(page).to have_content "See results"
|
||||
|
||||
end
|
||||
|
||||
scenario "See results button does not appear for unfinished budgets" do
|
||||
|
||||
not_finished_budget = create(:budget, :valuating)
|
||||
|
||||
visit admin_budget_budget_investments_path(budget_id: not_finished_budget.id)
|
||||
expect(page).not_to have_content "See results"
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user