require File.dirname(__FILE__) + '/../test_helper'
-class MessageTest < Test::Unit::TestCase
- fixtures :messages, :users
+class MessageTest < ActiveSupport::TestCase
+ api_fixtures
+ fixtures :messages
EURO = "\xe2\x82\xac" #euro symbol
def test_check_empty_message_fails
message = Message.new
assert !message.valid?
- assert message.errors.invalid?(:title)
- assert message.errors.invalid?(:body)
- assert message.errors.invalid?(:sent_on)
+ assert message.errors[:title].any?
+ assert message.errors[:body].any?
+ assert message.errors[:sent_on].any?
assert true, message.message_read
end