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:
parent
05b4406c14
commit
ab3b4b0437
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue