- # Check that the marking a message unread via XHR works
- post message_mark_path(:message_id => message, :mark => "unread")
- assert_response :see_other
- assert_not Message.find(message.id).message_read
-
- # Asking to mark a message with no ID should fail
- post message_mark_path
+ # Check that the marking a message unread works and redirects to inbox from the message page
+ post message_mark_path(message, :mark => "unread"), :headers => { :referer => message_path(message) }