Avoid DB changes after a request in budget spec

When using tests with a driver supporting JavaScript, there might be
concurrency issues if both the process running the test and the process
running the browser access the database once the browser has been
started.
This commit is contained in:
Javi Martín
2021-03-24 19:59:47 +01:00
parent 8ed09adcaf
commit 5cf10a917b

View File

@@ -529,7 +529,10 @@ describe "Admin budget investments", :admin do
expect(page).to have_link "Calculate Winner Investments"
budget.update!(phase: "accepting")
select "Accepting projects", from: "Phase"
click_button "Update Budget"
expect(page).to have_content "Participatory budget updated successfully"
visit admin_budget_budget_investments_path(budget)