From c0b9dcb1e29a6bd263e8d5a191a843017ad26922 Mon Sep 17 00:00:00 2001 From: Nestor <npegane@hotmail.com> Date: Wed, 11 Jul 2018 17:23:44 +0200 Subject: [PATCH] FIX #7659 unit test for updateRule OK --- src/core/models/PasswordModel.php | 4 ++-- test/PasswordControllerTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/models/PasswordModel.php b/src/core/models/PasswordModel.php index f215f015701..5ca66d85f65 100644 --- a/src/core/models/PasswordModel.php +++ b/src/core/models/PasswordModel.php @@ -71,8 +71,8 @@ class PasswordModel { ValidatorModel::notEmpty($aArgs, ['id']); ValidatorModel::intVal($aArgs, ['id', 'value']); - ValidatorModel::boolType($aArgs, ['enabled']); - + ValidatorModel::stringType($aArgs, ['enabled']); + DatabaseModel::update([ 'table' => 'password_rules', 'set' => [ diff --git a/test/PasswordControllerTest.php b/test/PasswordControllerTest.php index 929716e8dd2..17d81e34f80 100644 --- a/test/PasswordControllerTest.php +++ b/test/PasswordControllerTest.php @@ -33,7 +33,7 @@ class PasswordControllerTest extends TestCase [ 'id' => 1, 'value' => 5, - 'enabled' => 'true', + 'enabled' => true, ] ] ]; -- GitLab