Convenience helpers for using FrozenClock in tests.
import FrozenClock.TestHelpers
test "expires after 1 hour" do
freeze_time ~U[2026-01-01 00:00:00Z] do
token = create_token()
travel(1, :hour)
assert expired?(token)
end
end
Summary
Functions
Freezes time at datetime for the duration of the block.
Re-export of FrozenClock.travel/2 so tests only need to import this module.
Functions
Freezes time at datetime for the duration of the block.
Time is always unfrozen afterwards, even if the block raises.
Re-export of FrozenClock.travel/2 so tests only need to import this module.