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

Add Valuator Group name validation & related specs #2576

Merged
merged 2 commits into from
Apr 5, 2018

Conversation

bertocq
Copy link
Collaborator

@bertocq bertocq commented Apr 5, 2018

References

This is a backport of Madrid's fork merged & tested in production PR AyuntamientoMadrid#1358

Objectives

As a refactor for following PR's AyuntamientoMadrid#1357 & AyuntamientoMadrid#1359

  • ValuatorGroup#name needs to be present and unique
  • Budget::Investment#by_valuator_group scope needs to be tested

Visual Changes (if any)

None

Notes

None

@bertocq bertocq force-pushed the refactor_for_valuator_groups branch from 30ee22c to 7ee9d67 Compare April 5, 2018 18:24
Why:

ValuatorGroup name should be unique and present to be able to identify
correctly each of them.

How:
  - Adding a presence & uniqueness validation at the model
  - Adding a sequenced value for name attribute at its factory
  - Adding missing model spec that covers validations
@bertocq bertocq force-pushed the refactor_for_valuator_groups branch from 7ee9d67 to e38b4d3 Compare April 5, 2018 20:12
Budget::Investment#by_valuator_group scope didn't had a test scenario
@bertocq bertocq force-pushed the refactor_for_valuator_groups branch from e38b4d3 to 43d78c6 Compare April 5, 2018 22:22
@bertocq bertocq merged commit cbd06c2 into master Apr 5, 2018
@bertocq bertocq deleted the refactor_for_valuator_groups branch April 5, 2018 22:23
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