assert message.errors[:title].any?
assert message.errors[:body].any?
assert message.errors[:sent_on].any?
assert message.errors[:title].any?
assert message.errors[:body].any?
assert message.errors[:sent_on].any?
# its OK to accept invalid UTF-8 as long as we return it unmodified.
db_msg = msg.class.find(msg.id)
assert_equal char, db_msg.title, "Database silently truncated message title"
# its OK to accept invalid UTF-8 as long as we return it unmodified.
db_msg = msg.class.find(msg.id)
assert_equal char, db_msg.title, "Database silently truncated message title"
rescue ArgumentError => ex
assert_equal ex.to_s, "invalid byte sequence in UTF-8"
rescue ArgumentError => ex
assert_equal ex.to_s, "invalid byte sequence in UTF-8"
assert_equal recipient_user, message.recipient
assert_equal mail.date, message.sent_on
assert_equal "Test message", message.title
assert_equal recipient_user, message.recipient
assert_equal mail.date, message.sent_on
assert_equal "Test message", message.title
assert_equal recipient_user, message.recipient
assert_equal mail.date, message.sent_on
assert_equal "Test message", message.title
assert_equal recipient_user, message.recipient
assert_equal mail.date, message.sent_on
assert_equal "Test message", message.title