Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status length validation spec updates #30132

Merged

Conversation

mjankowski
Copy link
Contributor

This is a slightly different approach to the spec portion of #30091

  • Pull out a helper method to DRY up what was repeated setup/double calls for the statuses
  • Change example titles to reference character limit, not specific amount
  • Add explicit const stub for the max_chars value, so that the spec remains relevant to that value even if the version in the validator were changed or made dependent on env var

I think in theory that other could be rebased against this and remove all it's spec changes and be reviewed just on the merits of the configurability.

Separately, I noticed while in here we sort of have a mix of styles in validator specs, with some doing this stub out of the activemodel errors object, and some doing a (what I think is preferred) more native usage of the validator via an in-spec class. Might do a round of updating there to align them all style wise to that latter approach.

@ClearlyClaire ClearlyClaire added this pull request to the merge queue May 2, 2024
Merged via the queue into mastodon:main with commit 2447497 May 2, 2024
29 checks passed
@mjankowski mjankowski deleted the status-length-validation-spec-updates branch May 2, 2024 12:51
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.

None yet

2 participants