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

Create a factory for a cocina object #3374

Merged
merged 1 commit into from
Apr 6, 2022
Merged

Create a factory for a cocina object #3374

merged 1 commit into from
Apr 6, 2022

Conversation

jcoyne
Copy link
Collaborator

@jcoyne jcoyne commented Mar 31, 2022

Why was this change made? 🤔

Per discussion on #3323 it was agreed to first make factories for cocina models. This is a minimal implementation of a factory that is useful in a test.

How was this change tested? 🤨

⚡ ⚠ If this change has cross service impact (including writing to shared file systems or interacting with other SDR APIs), run integration tests and/or test in [stage|qa] environment, in addition to specs. ⚡

⚡ ⚠ If this change updates the Argo UI, run all integration tests that use Argo and create a PR on the integration test repo to fix anything this change breaks. ⚡

@jcoyne jcoyne force-pushed the factories branch 6 times, most recently from 3740d48 to df0eb2f Compare March 31, 2022 21:35
administrative: {
hasAdminPolicy: 'druid:hv992ry2431'
})
Cocina::Models::Factories.build(:item)
Copy link
Contributor

Choose a reason for hiding this comment

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

For what it is worth, I'd suggest going with dro instead of item. It avoids the mental overhead of having to remember that an item is a DRO.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@jmartin-sul jmartin-sul merged commit 168823b into main Apr 6, 2022
@jmartin-sul jmartin-sul deleted the factories branch April 6, 2022 07:03
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.

3 participants