[openstreetmap/openstreetmap-website] Show diary entry after creation (PR #5484)
Andy Allan
notifications at github.com
Thu Jan 9 13:43:47 UTC 2025
@gravitystorm commented on this pull request.
> + assert_redirected_to diary_entry_path(user, user.diary_entries.last)
entry = DiaryEntry.last
> Maybe if we use `assert_difference "DiaryEntry.count"`, we should also use `DiaryEntry.last` (or change `assert_difference`).
I've gone for DiaryEntry.last, but rearranged slightly so that we use the `entry` variable for the redirection assertion too. Let me know what you think.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5484#discussion_r1908826712
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5484/review/2539954436 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250109/93a9e527/attachment.htm>
More information about the rails-dev
mailing list