assert_equal "You are logged in as `pulibc_test2' but the message you have asked to reply to was not sent to that user. Please login as the correct user in order to reply.", flash[:notice]
# Login as the right user
session[:user] = users(:public_user).id
# Check that the message reply page loads
assert_equal "You are logged in as `pulibc_test2' but the message you have asked to reply to was not sent to that user. Please login as the correct user in order to reply.", flash[:notice]
# Login as the right user
session[:user] = users(:public_user).id
# Check that the message reply page loads
- get :reply, :message_id => messages(:unread_message).id
+ get :reply, :message_id => unread_message.id
assert_response :success
assert_template "new"
assert_response :success
assert_template "new"
- assert_select "title", "OpenStreetMap | Re: test message 1"
assert_equal "You are logged in as `pulibc_test2' but the message you have asked to read was not sent by or to that user. Please login as the correct user in order to read it.", flash[:notice]
# Login as the message sender
session[:user] = users(:normal_user).id
# Check that the message sender can read the message
assert_equal "You are logged in as `pulibc_test2' but the message you have asked to read was not sent by or to that user. Please login as the correct user in order to read it.", flash[:notice]
# Login as the message sender
session[:user] = users(:normal_user).id
# Check that the message sender can read the message
- get :read, :message_id => messages(:unread_message).id