• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MushroomObserver / mushroom-observer / 27113242579
98%
main: 98%

Build:
Build:
LAST BUILD BRANCH: 3745-import-from-user-supplied-url
DEFAULT BRANCH: main
Ran 08 Jun 2026 02:55AM UTC
Jobs 1
Files 1473
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Jun 2026 02:51AM UTC coverage: 97.515% (-0.001%) from 97.516%
27113242579

push

github

nimmolo
check_index_sorting: hoist sort tables to controllers, delete 13 helpers

Refactors the test-infra contract for index-page sort coverage:
each index controller now exposes a public
`index_sort_options` instance method returning the `[[key, label],
...]` tuple table. `GeneralExtensions#check_index_sorting`
reads from `@controller.index_sort_options` after an initial
`get(:index)` (so contextual flips like rss_log can fire). Adds
`assert_each_sort_key_resolves` which checks every sort key
maps to a `Model.order_by_<key>` private method — catches
drift between controllers' tuples and what Query actually
accepts (Query/model dispatcher silently falls back to
`id: :desc` for unknown keys, so a typo would surface as a
secretly-broken dropdown without this check).

Controllers gaining `index_sort_options`:
  ArticlesController, CollectionNumbersController,
  CommentsController, ContributorsController, HerbariaController,
  HerbariumRecordsController, ImagesController,
  LocationsController, Locations::DescriptionsController,
  NamesController, Names::DescriptionsController,
  ObservationsController::Index, ProjectsController,
  SequencesController, SpeciesListsController, UsersController.

Phlex index views drop their inlined `sort_options` private
methods (`comments/index.rb`, `names/index.rb`,
`species_lists/index.rb`) and call `controller.index_sort_options`
instead. ERB index views drop their `helpers.<x>_index_sorts(...)`
calls in favor of `controller.index_sort_options`. The one
cross-controller caller (`observations/species_lists/edit.html.erb`,
which renders the species_lists sort dropdown for a foreign
`@all_lists` query) goes through a class-level cousin
`SpeciesListsController.sort_options(query: ...)`.

Deleted as dead/duplicated:
- 13 `<x>_index_sorts` helper methods (one was inlined as
  `tabs/observations_helper.rb#observations_index_sorts`).
- Helper files that became empty after removing those methods:
  `articles_helper.rb`, `descriptions_h... (continued)

53 of 53 new or added lines in 19 files covered. (100.0%)

45016 of 46163 relevant lines covered (97.52%)

753.98 hits per line

Jobs
ID Job ID Ran Files Coverage
1 27113242579.1 08 Jun 2026 02:55AM UTC 1473
97.52
GitHub Action Run
Source Files on build 27113242579
  • Tree
  • List 1473
  • Changed 24
  • Source Changed 24
  • Coverage Changed 24
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27113242579
  • 7319709d on github
  • Prev Build on main (#27112218755)
  • Next Build on nimmo-check-index-sorting-controller-method (#27115039512)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc