4 changed files with 18 additions and 14 deletions
@ -99,20 +99,20 @@ class LoginTest extends CIDatabaseTestCase
|
||||
$this->assertFalse($this->library->login('[email protected]', 'password123456')); |
||||
$this->assertEquals(lang('Aauth.notFoundUser'), $this->library->getErrorsArray()[0]); |
||||
|
||||
$userVariableModel = new UserVariableModel(); |
||||
$userVariableModel->save(1, 'verification_code', '12345678', true); |
||||
$this->library->clearErrors(); |
||||
$this->assertFalse($this->library->login('[email protected]', 'password123456')); |
||||
$this->assertEquals(lang('Aauth.notVerified'), $this->library->getErrorsArray()[0]); |
||||
$this->assertFalse($this->library->login('[email protected]', 'password1234567')); |
||||
$this->assertEquals(lang('Aauth.loginFailedAll'), $this->library->getErrorsArray()[0]); |
||||
|
||||
$this->library->banUser(1); |
||||
$this->library->clearErrors(); |
||||
$this->assertFalse($this->library->login('[email protected]', 'password123456')); |
||||
$this->assertEquals(lang('Aauth.invalidUserBanned'), $this->library->getErrorsArray()[0]); |
||||
|
||||
$userVariableModel = new UserVariableModel(); |
||||
$userVariableModel->save(1, 'verification_code', '12345678', true); |
||||
$this->library->clearErrors(); |
||||
$this->assertFalse($this->library->login('[email protected]', 'password1234567')); |
||||
$this->assertEquals(lang('Aauth.loginFailedAll'), $this->library->getErrorsArray()[0]); |
||||
$this->assertFalse($this->library->login('[email protected]', 'password123456')); |
||||
$this->assertEquals(lang('Aauth.notVerified'), $this->library->getErrorsArray()[0]); |
||||
|
||||
$this->library->login('[email protected]', 'password123456'); |
||||
$this->library->login('[email protected]', 'password123456'); |
||||
|
@ -65,6 +65,9 @@ class UserTest extends CIDatabaseTestCase
|
||||
|
||||
public function testUpdateUser() |
||||
{ |
||||
$session = $this->getInstance(); |
||||
$this->library = new Aauth(NULL, $session); |
||||
|
||||
$this->seeInDatabase($this->config->dbTableUsers, [ |
||||
'id' => 2, |
||||
'email' => '[email protected]', |
||||
|
Loading…
Reference in new issue