From ab3b4b0437427dce80efd0774c34ac40591c1e3d Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 30 Sep 2012 14:24:28 +0100 Subject: [PATCH] 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. --- test/functional/message_controller_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/message_controller_test.rb b/test/functional/message_controller_test.rb index 45190b714..d6b5671ac 100644 --- a/test/functional/message_controller_test.rb +++ b/test/functional/message_controller_test.rb @@ -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 -- 2.43.2