Remove tests for message paths without ids

These tests don't fail because they reuse ids from previous requests.
This commit is contained in:
Anton Khorev 2024-05-05 17:14:37 +03:00
parent b3759c0d58
commit 926788ff9a

View file

@ -263,10 +263,6 @@ class MessagesControllerTest < ActionDispatch::IntegrationTest
end
assert Message.find(unread_message.id).message_read
# Asking to reply to a message with no ID should fail
get message_reply_path
assert_response :success
# Asking to reply to a message with a bogus ID should fail
get message_reply_path(:message_id => 99999)
assert_response :not_found
@ -313,10 +309,6 @@ class MessagesControllerTest < ActionDispatch::IntegrationTest
assert_select "a[href='#{user_path user}']", :text => user.display_name
assert Message.find(unread_message.id).message_read
# Asking to read a message with no ID should fail
get message_path
assert_response :success
# Asking to read a message with a bogus ID should fail
get message_path(:id => 99999)
assert_response :not_found
@ -417,10 +409,6 @@ class MessagesControllerTest < ActionDispatch::IntegrationTest
assert_response :see_other
assert_not Message.find(unread_message.id).message_read
# Asking to mark a message with no ID should fail
post message_mark_path
assert_redirected_to inbox_messages_path
# Asking to mark a message with a bogus ID should fail
post message_mark_path(:message_id => 99999)
assert_response :not_found
@ -467,10 +455,6 @@ class MessagesControllerTest < ActionDispatch::IntegrationTest
assert_not m.from_user_visible
assert m.to_user_visible
# Asking to destroy a message with no ID should fail
delete message_path
assert_redirected_to inbox_messages_path
# Asking to destroy a message with a bogus ID should fail
delete message_path(:id => 99999)
assert_response :not_found