Avoid creating a budget in drafting phase to test results access

This commit is contained in:
Bertocq
2018-01-09 01:16:09 +01:00
parent beee890285
commit 2c3d8e9fd5

View File

@@ -65,7 +65,7 @@ feature 'Results' do
end end
scenario "If budget is in a phase different from finished results can't be accessed" do scenario "If budget is in a phase different from finished results can't be accessed" do
budget.update phase: (Budget::PHASES - ["finished"]).sample budget.update(phase: (Budget::PHASES - ['drafting', 'finished']).sample)
visit budget_path(budget) visit budget_path(budget)
expect(page).not_to have_link "See results" expect(page).not_to have_link "See results"