Skip to content
This repository was archived by the owner on Feb 13, 2026. It is now read-only.

add model level validation for uniqueness of step in a given workflow and version#283

Merged
mjgiarlo merged 1 commit intomasterfrom
282-dupe-validation
Nov 15, 2019
Merged

add model level validation for uniqueness of step in a given workflow and version#283
mjgiarlo merged 1 commit intomasterfrom
282-dupe-validation

Conversation

@peetucket
Copy link
Copy Markdown
Contributor

@peetucket peetucket commented Nov 15, 2019

Why was this change made?

fixes #282

note: we should eventually follow this up with the work in #40, but this is a good first step that can be implemented right now

Was the documentation (API, README, DevOpsDocs, wiki, consul, etc.) updated?

let!(:item2) do
FactoryBot.create(:workflow_step,
repository: 'sdr',
process: 'publish',
Copy link
Copy Markdown
Contributor Author

@peetucket peetucket Nov 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

necessary for tests to continue to work with our new validation that prevents dupe steps from being added ... doesn't need to be "publish" but needs to be different than :item1 and :item3


let!(:item3) do
FactoryBot.create(:workflow_step)
FactoryBot.create(:workflow_step, process: 'shelve')
Copy link
Copy Markdown
Contributor Author

@peetucket peetucket Nov 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

necessary for tests to continue to work with our new validation that prevents dupe steps from being added ... doesn't need to be "shelve" but needs to be different than :item1 and :item2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add rails model level validation to ensure that we do not have duplicate rows for the same workflow/step/version

2 participants