LG-13345 | FormObject fix in AgreementController#10652
Merged
Conversation
This makes some small adjustments to how bring our FormObject usage in line with best practices.
n1zyy
commented
May 17, 2024
| it 'renders the form again' do | ||
| put :update, params: params | ||
| expect(response).to redirect_to(idv_agreement_url) | ||
| expect(response).to render_template('idv/agreement/show') |
Contributor
Author
There was a problem hiding this comment.
For reasons I don't fully understand yet, response.body is an empty string here, so I'm only able to make this assertion, but not that it contains the error string that wasn't previously being displayed.
Contributor
There was a problem hiding this comment.
Controller specs don't render views by default, which may be causing what you're seeing. You can opt-in if you wanted to specifically assert against view content, though typically that'd happen in the view specs instead.
https://rspec.info/features/6-0/rspec-rails/controller-specs/render-views/
I think what you have here makes sense.
changelog: Internal, FormObject, Fix usage in AgreementController
jmhooper
approved these changes
May 20, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes some small adjustments to how bring our FormObject usage in line with best practices.