* Adds guard clauses and better error messages to UsersController #confirm_destroy * Adds tests around guard clauses in UsersController #confirm_destroy * Adds a custom error for invalid tokens in UsersController#confirm_destroy * Refactor user_destroy_token.rb initialize method to be more succinct * Removes unnecessary code from user_self_destroy_spec.rb and fixes failing InvalidToken spec * Reworks code in #confirm_destroy to be consistent with other #destroy methods * Adjust token mismatch test to use mismatched tokens * Refactors #confirm_destroy and adds a before_action to Users::Controller - Reworks the logic within #confirm_destroy and removes excess code - Adds set_or_sign_in_user before_action for #confirm_destroy - Removes custom InvalidToken error message * Cleans up spec and adds an additional test around logged out user edge case * Fixes failing tests due to changes in #confirm_delete flow * Adjusts test logic in user_self_destroy_spec.rb * Refactors code by removing custom before_action and rewriting conditionals |
||
|---|---|---|
| .. | ||
| black_box | ||
| decorators | ||
| factories | ||
| fixtures | ||
| generator | ||
| helpers | ||
| initializers | ||
| lib | ||
| liquid_tags | ||
| mailers | ||
| models | ||
| policies | ||
| queries/admin | ||
| refinements | ||
| requests | ||
| routing | ||
| serializers/search | ||
| services | ||
| support | ||
| system | ||
| tasks | ||
| uploaders | ||
| view_objects | ||
| views | ||
| workers | ||
| rails_helper.rb | ||
| spec_helper.rb | ||