mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-09 00:00:12 +09:00
Keep same-second unread events and bound idle push connections
This commit is contained in:
@@ -44,7 +44,7 @@ class PresenceChannelTest < ActionCable::Channel::TestCase
|
||||
membership = users(:david).memberships.first
|
||||
|
||||
freeze_time do
|
||||
assert_broadcast_on "user_#{users(:david).id}_reads", { room_id: membership.room_id, at: Time.current.to_fs(:epoch) } do
|
||||
assert_broadcast_on "user_#{users(:david).id}_reads", { room_id: membership.room_id, at: Time.current.to_f } do
|
||||
subscribe room_id: membership.room_id
|
||||
end
|
||||
end
|
||||
|
||||
@@ -35,7 +35,7 @@ class UnreadRoomsChannelTest < ActionCable::Channel::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
assert_equal [ { "roomId" => direct.id, "at" => message.created_at.to_fs(:epoch) } ], broadcasts
|
||||
assert_equal [ { "roomId" => direct.id, "at" => message.created_at.to_f } ], broadcasts
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user