From b0d1d009166195a5d86272e3c80a38e52f46bffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 23 Oct 2019 17:36:09 +0200 Subject: [PATCH] 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. --- .../admin/poll/questions/answers/documents/documents_spec.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spec/features/admin/poll/questions/answers/documents/documents_spec.rb b/spec/features/admin/poll/questions/answers/documents/documents_spec.rb index c8c59cd79..629b12460 100644 --- a/spec/features/admin/poll/questions/answers/documents/documents_spec.rb +++ b/spec/features/admin/poll/questions/answers/documents/documents_spec.rb @@ -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