Fix modal text warning in answers documents spec

It looks like we get this warning if we check the dialog message. Using
`accept_confirm` the same way we do in the rest of the application
solves the problem.
This commit is contained in:
Javi Martín
2019-10-23 17:36:09 +02:00
parent 48cbb934c1
commit b0d1d00916

View File

@@ -34,9 +34,7 @@ describe "Documents" do
visit admin_answer_documents_path(answer)
expect(page).to have_content(document.title)
accept_confirm "Are you sure?" do
click_link "Delete"
end
accept_confirm { click_link "Delete" }
expect(page).not_to have_content(document.title)
end