diff --git a/test/system/credit_card_bills_test.rb b/test/system/credit_card_bills_test.rb index 5c829c8..ec2fb7e 100644 --- a/test/system/credit_card_bills_test.rb +++ b/test/system/credit_card_bills_test.rb @@ -37,7 +37,7 @@ class CreditCardBillsTest < ApplicationSystemTestCase test "should destroy Credit card bill" do visit credit_card_bill_url(@credit_card_bill) - click_on "Delete credit card bill", match: :first + accept_prompt { click_on "Delete credit card bill", match: :first } assert_text "Credit card bill was successfully destroyed" end diff --git a/test/system/expenses_test.rb b/test/system/expenses_test.rb index d23f851..ba276bf 100644 --- a/test/system/expenses_test.rb +++ b/test/system/expenses_test.rb @@ -47,7 +47,7 @@ class ExpensesTest < ApplicationSystemTestCase test "should destroy Expense" do visit expense_url(@expense) - click_on "Delete expense", match: :first + accept_prompt { click_on "Delete expense", match: :first } assert_text "Expense was successfully destroyed" end