-
-
Notifications
You must be signed in to change notification settings - Fork 447
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
Refactor request spec test #4147
Refactor request spec test #4147
Conversation
Fixes rubyforgood#4135 When individuals requests were submitted with incorrect values the error page did not preserve correct or incorrect inputs. This was happening because the controller created a new request on error. Now the new request will be populated with the items from the failed request. I attempted to reuse the failed request, however, because the individuals request is a wrapper around a family request that behavior was not possible.
2157438
to
f6d8069
Compare
@cielf When I was refactoring I noticed that family requests require certain permissions: module Partners
class FamilyRequestsController < BaseController
before_action :verify_partner_is_active
before_action :authorize_verified_partners whereas Individual requests don't: module Partners
class FamilyRequestsController < BaseController
no callbacks here is that intended or an oversight? |
From a business p.o.v. you have to be approved before making requests for all three of the different kinds of requests. |
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.
Some tiny comments - I really love this! Not only the reduction in system tests (which are always awesome) but the tests are really easy to read and well organized. Kudos!
Thank you! |
@elasticspoon: Your PR |
Depends on #4142
Description
Moves a bunch of behavior from
managing_requests_system_spec.rb
to request specs. A lot of what the system test was doing was basically checking input validation, that can be done in requests spec much cheaper.Type of change