Skip to content

fix: wrap flaky listable tests in Timecop#2528

Open
mroderick wants to merge 2 commits intomasterfrom
fix/flaky-listable-tests
Open

fix: wrap flaky listable tests in Timecop#2528
mroderick wants to merge 2 commits intomasterfrom
fix/flaky-listable-tests

Conversation

@mroderick
Copy link
Collaborator

Summary

  • Wraps flaky #upcoming and #past scope tests in Timecop.travel blocks to freeze time during test execution
  • Tests were failing in CI due to timing issues when running in parallel - the Workshop.upcoming and Workshop.past scopes use Time.zone.now which changed between test setup and scope evaluation
  • Fixes intermittent test failures in CI runs

Reverts the render_not_found method to use respond_to, matching the pattern
used in the exception handler. This fixes MissingTemplate errors when
requests come in with JSON format (e.g., from API clients).

The previous change (3eeca62) simplified render_not_found but broke JSON
responses. Now HTML requests get the proper 404 page while API requests
get an empty 404 response.

Adds tests for both HTML and JSON format handling.
@mroderick mroderick marked this pull request as ready for review March 17, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants