docbrown/spec/system/admin
Joshua Wehner a20cf3e02b
Unique cross-model-slug check is likely misconfigured (#19263)
* Page unique_cross_model_slug seems misconfigured

* Update validator test

* More verbose invalid attribute message

* Try dynamic model/attribute registration

* Rubocop

* Use the cross-model-slug existence check

* Register with the dynamic cross-model-slug checker

* Cleanup

* Add missing keys to fr

* Update format regex

* Adjust validation: always presence, unique if changed

* Tests can create reserved-word pages when they need to

* Slugs can be mixed case?

* Case-sensitive is better, actually

* Refactor to use CrossModel check

* Refactor, rename for clarity

* Refactor, avoid mocking oneself

* Refactor, injectable everything

* Add reservedword check to extracted exists? checker

* Move to concerns

* Without dynamic registration

* extend when needed

* Cleanup comments, remove registration references

---------

Co-authored-by: Goran <gorang.pub@gmail.com>
2023-04-07 17:04:45 +02:00
..
config Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
admin_awards_badges_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
admin_creates_new_page_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
admin_creates_new_tag_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
admin_deletes_user_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
admin_invites_user_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
admin_manages_organizations_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
admin_manages_pages_spec.rb Unique cross-model-slug check is likely misconfigured (#19263) 2023-04-07 17:04:45 +02:00
admin_manages_profile_fields_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
admin_manages_reports_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
admin_updates_tag_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
admin_views_tags_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00
admin_visits_badge_achievements_spec.rb Fix nested sidebar active item highlight (#18973) 2023-02-21 16:18:42 -05:00
admin_visits_extensions_spec.rb Fix nested sidebar active item highlight (#18973) 2023-02-21 16:18:42 -05:00
admin_visits_overview_spec.rb Routine rubocop fix on /spec (#19217) 2023-03-21 09:55:26 -04:00