-
Notifications
You must be signed in to change notification settings - Fork 124
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
test creation of collections when valkyrie resource & fix failures #5267
Conversation
d478da9
to
6185e98
Compare
3b3659f
to
3f07cf1
Compare
…mCollection’ NOTE: A few tests pass without requiring changes. Those were not marked pending.
3f07cf1
to
ebe5f72
Compare
@@ -220,6 +220,7 @@ def valkyrie_create | |||
@collection = transactions['change_set.create_collection'] | |||
.with_step_args( | |||
'change_set.set_user_as_depositor' => { user: current_user }, | |||
'change_set.add_to_collections' => { collection_ids: Array(params[:parent_id]) }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes failure to set parent collection in test: #create
when params includes parent_id
@@ -390,7 +395,8 @@ def collection_params | |||
form_class.model_attributes(params[:collection]) | |||
else | |||
params.permit(collection: {})[:collection] | |||
.merge(params.permit(:collection_type_gid)) | |||
.merge(params.permit(:collection_type_gid) | |||
.with_defaults(collection_type_gid: default_collection_type_gid)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixes failure to set collection type in test: #create
when setting collection type
and collection type is not passed
Add tests for creating collections when the collection is processed as a Hyrax::PcdmCollection which is a Valkyrie::Resource. Marks pending tests for other actions (e.g. update, edit, show), except for a few that pass as written.
Fixes several failing tests:
@samvera/hyrax-code-reviewers