From 8aaff785094584938c2bbb07ec5999320d1309dd Mon Sep 17 00:00:00 2001 From: Andres Campanario Date: Tue, 12 Mar 2024 10:30:45 +0100 Subject: [PATCH] adjust assertEqual flash message to nrew message --- .../Integration/PasswordManagementTraitIntegrationTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/TestCase/Controller/Traits/Integration/PasswordManagementTraitIntegrationTest.php b/tests/TestCase/Controller/Traits/Integration/PasswordManagementTraitIntegrationTest.php index 7e8cd187..f7b082f1 100644 --- a/tests/TestCase/Controller/Traits/Integration/PasswordManagementTraitIntegrationTest.php +++ b/tests/TestCase/Controller/Traits/Integration/PasswordManagementTraitIntegrationTest.php @@ -53,7 +53,7 @@ public function testRequestResetPasswordPostValidEmail() { $Table = TableRegistry::getTableLocator()->get('CakeDC/Users.Users'); $userBefore = $Table->find()->where(['email' => '4@example.com'])->firstOrFail(); - $this->assertEquals('There was an error please contact Administrator', $userBefore->token); + $this->assertEquals('token-4', $userBefore->token); $this->enableRetainFlashMessages(); $this->enableSecurityToken(); $data = [ @@ -63,7 +63,7 @@ public function testRequestResetPasswordPostValidEmail() $this->assertRedirect('/login'); $this->assertFlashMessage('If the account is valid, the system will send an instructional email to the address on record.'); $userAfter = $Table->find()->where(['email' => '4@example.com'])->firstOrFail(); - $this->assertNotEquals('There was an error please contact Administrator', $userAfter->token); + $this->assertNotEquals('token-4', $userAfter->token); $this->assertNotEmpty($userAfter->token); $this->get("/users/reset-password/{$userAfter->token}");