diff --git a/tests/Feature/DatabaseUserProviderTest.php b/tests/Feature/DatabaseUserProviderTest.php index beba034..38d2006 100644 --- a/tests/Feature/DatabaseUserProviderTest.php +++ b/tests/Feature/DatabaseUserProviderTest.php @@ -159,4 +159,17 @@ public function test_failing_loudly_throws_exception_when_resolving_users() $provider->retrieveByCredentials([]); } + + public function test_rehash_password_if_required_does_nothing_when_password_column_disabled() + { + $synchronizer = new UserSynchronizer(TestUserModelStub::class, [ + 'password_column' => false, + ]); + + $provider = $this->createDatabaseUserProvider(synchronizer: $synchronizer); + + $provider->rehashPasswordIfRequired($model = new TestUserModelStub, ['password' => 'secret']); + + $this->assertNull($model->password); + } }