You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DashboardQuery specs: add a query-count guard and host-less workshop coverage #3071
The spec added in PR #3066 checks host values only, so it cannot detect a query-shape regression on the dashboard path. Two gaps to close in spec/queries/dashboard_query_spec.rb:
Query-count guard. The new example asserts map(&:host)).to all(eq(host)). Workshop#host lazy-loads through workshop_host&.sponsor, so deleting preload(workshop_host: :sponsor) from app/queries/dashboard_query.rb leaves every dashboard spec green while restoring a per-card query on the homepage. The events path already guards this at spec/requests/event_card_render_query_cost_spec.rb:38 ("does not add per-card queries for hosted workshops on /events/upcoming"); the dashboard needs a counterpart that asserts the query count stays flat as the card count grows.
Host-less workshops. Nothing asserts the other half of the #2975 failure mode:
a workshop with only non-host sponsors must resolve host to nil, not to one of those sponsors
a workshop with no workshop_sponsor rows must render without breakage
Activity
test: guard dashboard query cost and host-less workshops