5563 - Replace value parameter spec stubs with real tests#7068
Open
fuentesjr wants to merge 4 commits into
Open
5563 - Replace value parameter spec stubs with real tests#7068fuentesjr wants to merge 4 commits into
fuentesjr wants to merge 4 commits into
Conversation
fuentesjr
requested review from
FireLemons,
compwron and
elasticspoon
as code owners
July 17, 2026 01:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What github issue is this PR for, if any?
Part of #5563 — intentionally not
Resolves, since the umbrella has more stubs remaining.What changed, and why?
Replaces the four
pending "add some tests for X"stubs inspec/values/with real specs (one commit per file), following the patterns incase_contact_parameters_spec.rb,volunteer_parameters_spec.rb, andbanner_parameters_spec.rb:address_attributes),ParameterMissingon a missing root key, and each builder method (with_organization,with_password,with_type,without_type,without_active,with_only,without):supervisor/:casa_admin); specs pin the root key,ParameterMissing, and one inherited builder each rather than re-testing the parent's surfaceSimpleDelegatorrather than aUserParameterssubclass:email/passwordpassthrough, unpermitted filtering,ParameterMissing, andwith_passwordThese characterize current behavior; no app code changed.
One thing worth a look: writing these surfaced a real bug in
UserParameters#without, filed as #7067.ActionController::Parameters#reject!yields string keys, so the symbol-keyedkeys.include?(key)check never matches and the method silently removes nothing. Its only caller —CreateCasaAdminService#build— passes symbols (.without(:active, :type)), so neither attribute is actually stripped from admin creation. The specs document current behavior withNOTE:comments pointing at #7067 rather than fixing app code in a test PR; happy to follow up with the fix separately.How is this tested? (please write rspec and jest tests!) 💖💪
bundle exec rspec spec/values/user_parameters_spec.rb spec/values/supervisor_parameters_spec.rb spec/values/casa_admin_parameters_spec.rb spec/values/all_casa_admin_parameters_spec.rb→ 22 examples, 0 failures, 0 pendingbundle exec standardrb spec/values/→ no offensespending/skip/xitremains in the four filesScreenshots please :)
N/A — test-only change, no UI.