Test the destroy action

This commit is contained in:
Jason Zimdars
2025-07-23 17:26:01 -05:00
parent 4276aad5a7
commit 6ef390f201
@@ -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