heartcombo--devise/test/models
Carlos Antonio da Silva a3ae35e9c9 Create a model hook around the lockable warden hook to reset attempts
Resetting failed attempts after sign in happened inside a warden hook
specific for the lockable module, but that was hidden inside the hook
implementation and didn't allow any user customization.

One such customization needed for example is to direct these updates to
a write DB when using a multi-DB setup. With the logic hidden in the
warden hook this wasn't possible, now that it's exposed in a model
method much like trackable, we can override the model method to wrap it
in a connection switch block for example, point to a write DB, and
simply call `super`.

Closes #5310
Related to #5264 and #5133
2021-04-02 15:45:25 -03:00
..
authenticatable_test.rb Test on rails 6.1 (#5323) 2021-01-04 20:17:58 -03:00
confirmable_test.rb User `assert_includes`/`refute_includes` minitest helpers 2020-08-27 18:38:26 -03:00
database_authenticatable_test.rb Use minitest helpers to check if objects respond to certain methods 2021-03-22 18:43:19 -03:00
lockable_test.rb Create a model hook around the lockable warden hook to reset attempts 2021-04-02 15:45:25 -03:00
omniauthable_test.rb Fix order of arguments for `assert_equal` on tests 2020-08-27 18:24:17 -03:00
recoverable_test.rb User `assert_includes`/`refute_includes` minitest helpers 2020-08-27 18:38:26 -03:00
registerable_test.rb Fix order of arguments for `assert_equal` on tests 2020-08-27 18:24:17 -03:00
rememberable_test.rb Use minitest helpers to check if objects respond to certain methods 2021-03-22 18:43:19 -03:00
serializable_test.rb Replace XML with JSON serialization across the test suite 2021-02-15 14:40:05 -03:00
timeoutable_test.rb Fix order of arguments for `assert_equal` on tests 2020-08-27 18:24:17 -03:00
trackable_test.rb Fix order of arguments for `assert_equal` on tests 2020-08-27 18:24:17 -03:00
validatable_test.rb Fix order of arguments for `assert_equal` on tests 2020-08-27 18:24:17 -03:00