Skip to content

Created validation for when urgency and custom both true#268

Merged
edimossilva merged 6 commits intoespoo-dev:mainfrom
lucasleandro1:feat/validate-eventprocedure-urgency-custom
Apr 16, 2025
Merged

Created validation for when urgency and custom both true#268
edimossilva merged 6 commits intoespoo-dev:mainfrom
lucasleandro1:feat/validate-eventprocedure-urgency-custom

Conversation

@lucasleandro1
Copy link
Contributor

@lucasleandro1 lucasleandro1 commented Apr 8, 2025

Validation of the EventProcedure model to ensure that it is not possible to create records where both the urgency field and the custom attribute of the associated procedure are set to true.

fix #256

@lucasleandro1
Copy link
Contributor Author

With this validation created, the rspec test ./spec/operations/event_procedures/create_spec.rb:96 was broken, as it has urgency and custom true

@lucasleandro1
Copy link
Contributor Author

In test spec/operations/event_procedures/create_spec.rb:96 the urgency value was changed from true to false in the test, as the current validation prevents custom procedures from being marked as urgent. The change ensures that the test simulates a valid creation.

@edimossilva edimossilva merged commit ebce6c1 into espoo-dev:main Apr 16, 2025
3 checks passed
@lucasleandro1 lucasleandro1 changed the title created validation for when urgency and custom both true feat: created validation for when urgency and custom both true May 2, 2025
@lucasleandro1 lucasleandro1 changed the title feat: created validation for when urgency and custom both true Created validation for when urgency and custom both true May 28, 2025
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.

Add validation to EventProcedure if custom = true and urgency = true EventProcedure is invalid

2 participants