X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f0e76d90add15e8bec6a4350f69f2a06f168574b..212fe75b6fd26d01dfacf31650e7f71eb7f06a63:/test/controllers/messages_controller_test.rb?ds=sidebyside diff --git a/test/controllers/messages_controller_test.rb b/test/controllers/messages_controller_test.rb index df7146ad6..40581993f 100644 --- a/test/controllers/messages_controller_test.rb +++ b/test/controllers/messages_controller_test.rb @@ -408,15 +408,13 @@ class MessagesControllerTest < ActionDispatch::IntegrationTest assert_not Message.find(unread_message.id).message_read # Check that the marking a message read via XHR works - post message_mark_path(:message_id => unread_message, :mark => "read"), :xhr => true - assert_response :success - assert_template "mark" + post message_mark_path(:message_id => unread_message, :mark => "read") + assert_response :see_other assert Message.find(unread_message.id).message_read # Check that the marking a message unread via XHR works - post message_mark_path(:message_id => unread_message, :mark => "unread"), :xhr => true - assert_response :success - assert_template "mark" + post message_mark_path(:message_id => unread_message, :mark => "unread") + assert_response :see_other assert_not Message.find(unread_message.id).message_read # Asking to mark a message with no ID should fail