From 1083784a98baf1503aecf64573e7de1924229695 Mon Sep 17 00:00:00 2001 From: Rosa Gutierrez Date: Mon, 19 Jan 2026 19:36:19 +0100 Subject: [PATCH 1/2] Update `turbo-rails` to get latest Turbo version In preparation for offline mode. --- Gemfile.lock | 2 +- Gemfile.saas.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 504bffd01..ea92feb39 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -449,7 +449,7 @@ GEM timeout (0.6.0) trilogy (2.9.0) tsort (0.2.0) - turbo-rails (2.0.20) + turbo-rails (2.0.21) actionpack (>= 7.1.0) railties (>= 7.1.0) tzinfo (2.0.6) diff --git a/Gemfile.saas.lock b/Gemfile.saas.lock index 0b0e79cb8..6dcb7b9ee 100644 --- a/Gemfile.saas.lock +++ b/Gemfile.saas.lock @@ -568,7 +568,7 @@ GEM timeout (0.6.0) trilogy (2.9.0) tsort (0.2.0) - turbo-rails (2.0.20) + turbo-rails (2.0.21) actionpack (>= 7.1.0) railties (>= 7.1.0) tzinfo (2.0.6) From 967f76de99494f08a8a6d2a1be45120c74d0b968 Mon Sep 17 00:00:00 2001 From: Rosa Gutierrez Date: Mon, 19 Jan 2026 19:49:35 +0100 Subject: [PATCH 2/2] Fix notification broadcast test for turbo-rails 2.0.21 turbo-rails 2.0.21 changed `capture_turbo_stream_broadcasts` to only return broadcasts produced within the block, matching its documented behavior (see hotwired/turbo-rails#736). Since `broadcast_unread` uses `broadcast_prepend_later_to` (async via job), we need to wrap the call in `perform_enqueued_jobs` so the broadcast actually happens within the assertion block. Co-Authored-By: Claude Opus 4.5 --- test/models/notification_test.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/models/notification_test.rb b/test/models/notification_test.rb index cb230070a..9c8ebbe12 100644 --- a/test/models/notification_test.rb +++ b/test/models/notification_test.rb @@ -15,7 +15,9 @@ class NotificationTest < ActiveSupport::TestCase notification.read # Mark as read first assert_turbo_stream_broadcasts([ notification.user, :notifications ], count: 1) do - notification.unread + perform_enqueued_jobs do + notification.unread + end end end