diff --git a/test/controllers/notifications/readings_controller_test.rb b/test/controllers/notifications/readings_controller_test.rb index 75a8a4875..cdbca89ce 100644 --- a/test/controllers/notifications/readings_controller_test.rb +++ b/test/controllers/notifications/readings_controller_test.rb @@ -12,6 +12,16 @@ class Notifications::ReadingsControllerTest < ActionDispatch::IntegrationTest end end + test "destroy" do + notification = notifications(:logo_published_kevin) + notification.read # Mark as read first + + assert_changes -> { notification.reload.read? }, from: true, to: false do + delete read_notification_path(notification, format: :turbo_stream) + assert_response :success + end + end + test "create all" do assert_changes -> { notifications(:logo_published_kevin).reload.read? }, from: false, to: true do assert_changes -> { notifications(:layout_commented_kevin).reload.read? }, from: false, to: true do