Making sure the hashed password is correct

parent f6d00a3d
...@@ -92,8 +92,16 @@ class SentinelUserRepositoryTest extends BaseUserTestCase ...@@ -92,8 +92,16 @@ class SentinelUserRepositoryTest extends BaseUserTestCase
'password' => 'demo1234', 'password' => 'demo1234',
], ['User']); ], ['User']);
$hasher = app('sentinel.hasher');
$this->assertTrue($hasher->check('demo1234', $userOne->password));
$this->assertNotEquals('demo1234', $userOne->password); $this->assertNotEquals('demo1234', $userOne->password);
$this->assertTrue($hasher->check('demo1234', $userTwo->password));
$this->assertNotEquals('demo1234', $userTwo->password); $this->assertNotEquals('demo1234', $userTwo->password);
$this->assertTrue($hasher->check('demo1234', $userThree->password));
$this->assertNotEquals('demo1234', $userThree->password); $this->assertNotEquals('demo1234', $userThree->password);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment