docbrown/spec/requests/user
Julianna Tetreault d06ee645f8
Improve Error Messaging for Self-Deletion Confirmation Flow (#12266) [deploy]
* 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
2021-01-15 11:51:06 -07:00
..
user_destroy_spec.rb Improve Error Messaging for Self-Deletion Confirmation Flow (#12266) [deploy] 2021-01-15 11:51:06 -07:00
user_organization_spec.rb Rubocop: Enable and fix Style/StringConcatenation (#9844) 2020-08-18 14:50:15 +02:00
user_profile_spec.rb Standardize bot meta tags (#12197) 2021-01-13 11:16:33 +07:00
user_settings_spec.rb Remove RssReader (#12169) 2021-01-08 11:45:15 -05:00
user_show_spec.rb Drop profile columns from user (#10707) 2020-12-03 08:14:38 +07:00
user_suggestions_spec.rb Drop profile columns from user (#10707) 2020-12-03 08:14:38 +07:00