Increase allowed time delta in message sending test

Only allowing one second can fail sometimes, because if the actual
time is close to rolling over to the next second then the message
time will be rounded down but Time.now may roll over to the next
second before we get to the assertion.
This commit is contained in:
Tom Hughes 2012-09-30 14:24:28 +01:00
parent 05b4406c14
commit ab3b4b0437

View file

@ -85,7 +85,7 @@ class MessageControllerTest < ActionController::TestCase
m = Message.find(3)
assert_equal users(:normal_user).id, m.from_user_id
assert_equal users(:public_user).id, m.to_user_id
assert_in_delta Time.now, m.sent_on, 1
assert_in_delta Time.now, m.sent_on, 2
assert_equal "Test Message", m.title
assert_equal "Test message body", m.body
assert_equal "markdown", m.body_format