Browse Source

update Aauth/LoginTest

v3-dev
REJack 6 years ago
parent
commit
cb765cfe35
No known key found for this signature in database
GPG Key ID: 4A44B48700429F46
  1. 5
      tests/Aauth/Libraries/Aauth/LoginTest.php

5
tests/Aauth/Libraries/Aauth/LoginTest.php

@ -100,7 +100,6 @@ class LoginTest extends CIDatabaseTestCase
$session = $this->getInstance();
$config = new AauthConfig();
$config->loginUseUsername = true;
print_r($config);
$this->library = new Aauth($config, $session);
$this->assertTrue($this->library->login('admin', 'password123456'));
}
@ -120,9 +119,10 @@ class LoginTest extends CIDatabaseTestCase
$session = $this->getInstance();
$config = new AauthConfig();
$config->loginUseUsername = true;
$this->library = new Aauth($config, $session);
$this->assertFalse($this->library->login('admina', 'password'));
$this->assertEquals(lang('Aauth.notFoundUser'), $this->library->getErrorsArray()[0]);
$this->library = new Aauth($config, $session);
$config->loginUseUsername = false;
}
public function testLoginFalseNotVerified()
@ -165,6 +165,7 @@ class LoginTest extends CIDatabaseTestCase
$this->library->login('admina@example.com', 'password123456');
$this->library->login('admina@example.com', 'password123456');
$this->library->login('admina@example.com', 'password123456');
$this->library->login('admina@example.com', 'password123456');
$this->assertFalse($this->library->login('admina@example.com', 'password123456'));
$this->assertEquals(lang('Aauth.loginAttemptsExceeded'), $this->library->getErrorsArray()[0]);
}

Loading…
Cancel
Save