Don't create records after starting the browser in user test
I accidentally made this mistake while trying to avoid the exact same
issue back in commit 73992b2c8. Accessing the database in a test after
starting the process running the browser has caused database corruption
in our CI multiple times.
This commit is contained in:
@@ -72,6 +72,7 @@ describe "Users" do
|
|||||||
scenario "Delete a level 2 user account from document verification page" do
|
scenario "Delete a level 2 user account from document verification page" do
|
||||||
level_2_user = create(:user, :level_two, document_number: "12345678Z")
|
level_2_user = create(:user, :level_two, document_number: "12345678Z")
|
||||||
manager = create(:manager)
|
manager = create(:manager)
|
||||||
|
administrator = create(:administrator)
|
||||||
|
|
||||||
login_as_manager(manager)
|
login_as_manager(manager)
|
||||||
visit management_document_verifications_path
|
visit management_document_verifications_path
|
||||||
@@ -92,7 +93,7 @@ describe "Users" do
|
|||||||
expect(page).to have_content "no user account associated to it"
|
expect(page).to have_content "no user account associated to it"
|
||||||
|
|
||||||
logout
|
logout
|
||||||
login_as(create(:administrator).user)
|
login_as(administrator.user)
|
||||||
|
|
||||||
visit admin_users_path(filter: "erased")
|
visit admin_users_path(filter: "erased")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user