Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

Fix Bills locale test to target the occurrence drawer link (#3938)

Sure Admin (bot)e435dbd3d423
diff --git a/test/controllers/bills_controller_test.rb b/test/controllers/bills_controller_test.rb
index f5f2cb3ff7..4d35239292 100644
--- a/test/controllers/bills_controller_test.rb
+++ b/test/controllers/bills_controller_test.rb
@@ -178,7 +178,9 @@ class BillsControllerTest < ActionDispatch::IntegrationTest
assert_response :success
date = I18n.l(due, format: :short, locale: :fr)
assert_select "div[class~='@lg:block']", text: date
- assert_select "a[href=?] p", bill_path(series), text: date
+ occurrence = series.recurring_occurrences.find_by!(due_on: due)
+ assert_select "a[data-turbo-frame=drawer][href=?] p",
+ bill_path(series, display: "drawer", occurrence: occurrence.id), text: date
end
# The summary answers one question in order: where am I this month, what is