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

🧹 Fix ./spec/requests/admin_dashboard_spec.rb spec #2092

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

jeremyf
Copy link
Contributor

@jeremyf jeremyf commented Dec 20, 2023

Prior to this commit, the specs failed because of the introduction of
the WorkflowResponsibilityFormDecorator. The decorator extracted prior
logic from Hyrax::Admin::WorkflowRolesController.

In copying that logic we introduced a subtle bug. Namely, we favored
the original .new behavior if and only if you provided a :user_id.
This broke places where we instantiated the form in a
view (e.g. ./app/views/hyrax/admin/workflow_roles/index.html.erb).

With this change, we make the behavior of .new fail towards its
"normal" implementation and instead rely on the presence of an attribute
to switch to a different form instantatior.

See Commit:

Related to:

Co-authored-by: LaRita Robinson [email protected]
Co-authored-by: Kirk Wang [email protected]

Prior to this commit, the specs failed because of the introduction of
the WorkflowResponsibilityFormDecorator.  The decorator extracted prior
logic from Hyrax::Admin::WorkflowRolesController.

In copying that logic we introduced a subtle bug.  Namely, we favored
the original `.new` behavior if and only if you provided a `:user_id`.
This broke places where we instantiated the form in a
view (e.g. `./app/views/hyrax/admin/workflow_roles/index.html.erb`).

With this change, we make the behavior of `.new` fail towards its
"normal" implementation and instead rely on the presence of an attribute
to switch to a different form instantatior.

See Commit:

- 095edca

Related to:

- #2079

Co-authored-by: LaRita Robinson <[email protected]>
Co-authored-by: Kirk Wang <[email protected]>
@kirkkwang kirkkwang added the patch-ver for release notes label Dec 20, 2023
@jeremyf jeremyf merged commit b4c0f5e into hyrax-5-upgrade Dec 20, 2023
2 of 4 checks passed
@jeremyf jeremyf deleted the hyrax-5-upgrade-workflow-responsibility branch December 20, 2023 21:26
@kirkkwang kirkkwang mentioned this pull request Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-ver for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants