Commit Graph

11 Commits

Author SHA1 Message Date
Kevin McConnell 59dd8ca549 Make IDs more time-sortable in tests
In order for model ordering to work as expected in tests, we need to
keep two properties:

- Fixtures are all created in the past
- Models sort in the order that they were created

This allows us to do things like this:

    post cards_path, params: { ... }
    created_card = Card.last

When using UUIDv7 PKs rather than sequential integers, we have to make
sure a couple of things happen in order for this still to be true:

- Fixtures should generate deterministic IDs that translate to UUIDs
  that would have been created in the past (i.e. before today)
- Newly created objects must have enough precision in their timestamps
  so that they sort in the order they were created, and their random
  component doesn't come into play.

To solve this, we use the deterministic numeric ID as a number of
milliseconds after an early year. And we ensure that the new timestamps
we create have sub-millisecond precision.
2025-11-17 09:12:40 -05:00
Kevin McConnell 1959e15f7e Fix more tests
These are mainly because the fixture's UUIDs are deterministic rather
than time-sortable, and more places where we need to correct the fixture
IDs as well.
2025-11-17 09:12:31 -05:00
Jason Zimdars a8fc78fa90 Update tests 2025-10-29 11:23:13 -05:00
Jason Zimdars 8ca9e80c6c Settle on "Moved to Done" 2025-10-17 16:56:26 -05:00
Jason Zimdars da413e7540 Remove closure reasons 2025-10-15 16:15:56 -05:00
Jorge Manrubia 1bb8de8564 Fix tests 2025-09-29 13:13:40 +02:00
Andy Smith 07a470a8ac Update tests 2025-07-28 13:12:53 -05:00
Andy Smith 8e795f183d Update system message to highlight verbs 2025-07-24 13:42:19 -05:00
Jason Zimdars d1f01182f2 Update tests 2025-05-28 15:32:00 -05:00
Jorge Manrubia 4f5e8bfc07 Test that system comments won't result in notifications 2025-04-30 12:28:19 +02:00
Jorge Manrubia b6c3e5c090 Add tests and clean unused events 2025-04-30 09:45:41 +02:00