Files
fizzy/test/models/bubble/eventable_test.rb
T
Jorge Manrubia 08cb69aca5 Replace auto_pop_at with generic last_activity column
so that we can use it in other scenarios
2025-04-04 09:45:56 +02:00

22 lines
561 B
Ruby

require "test_helper"
class Bubble::EventableTest < ActiveSupport::TestCase
setup do
Current.session = sessions(:david)
end
test "new bubbles get the current time as the last activity time" do
freeze_time
bubble = buckets(:writebook).bubbles.create!(title: "Some card card", creator: users(:david))
assert_equal Time.current, bubble.last_active_at
end
test "tracking events update the last activity time" do
travel_to Time.current
bubbles(:logo).pop!
assert_equal Time.current, bubbles(:logo).last_active_at
end
end