docbrown/spec
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
..
black_box
decorators Move HexComparer to Hex::Comparer service (#12202) 2021-01-12 11:34:30 -05:00
factories Basic MVP version of data update script page (#12167) 2021-01-07 23:12:51 +02:00
fixtures
generator
helpers Attempt to fix random test failures when dealing with the ForemInstance class (#12294) 2021-01-15 19:44:18 +02:00
initializers
lib Bug Fix:Increase Default Rate Limit for User Updates to 15 (#12281) 2021-01-14 12:51:08 -06:00
liquid_tags
mailers
models Attempt to fix random test failures when dealing with the ForemInstance class (#12294) 2021-01-15 19:44:18 +02:00
policies
queries/admin
refinements
requests Improve Error Messaging for Self-Deletion Confirmation Flow (#12266) [deploy] 2021-01-15 11:51:06 -07:00
routing
serializers/search
services Enable new rules and run Rubocop autocorrect (#12232) 2021-01-14 16:35:27 -05:00
support Code snippet fullscreen icon - setting constraints for size. (#12010) 2021-01-13 15:17:10 +01:00
system Improve Error Messaging for Self-Deletion Confirmation Flow (#12266) [deploy] 2021-01-15 11:51:06 -07:00
tasks
uploaders
view_objects
views Add max_bytes to imgproxy. (#12110) 2021-01-04 14:41:32 -05:00
workers Move MailchimpBot to Mailchimp::Bot service (#12205) 2021-01-12 10:28:48 -05:00
rails_helper.rb
spec_helper.rb