Test the destroy action
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user