Browse Source

updated Aauth/LoginTest

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

12
tests/Aauth/Libraries/Aauth/LoginTest.php

@ -61,11 +61,21 @@ class LoginTest extends CIDatabaseTestCase
//-------------------------------------------------------------------- //--------------------------------------------------------------------
public function testLoginEmailTrue()
{
$session = $this->getInstance();
$this->library = new Aauth(NULL, $session);
$this->assertTrue($this->library->login('admin@example.com', 'password123456'));
print_r($_SESSION);
}
public function testIsLoggedIn() public function testIsLoggedIn()
{ {
$session = $this->getInstance(); $session = $this->getInstance();
$this->library = new Aauth(NULL, $session); $this->library = new Aauth(NULL, $session);
$this->assertTrue($this->library->login('admin@example.com', 'password123456')); $session->set('user', [
'loggedIn' => true,
]);
$this->assertTrue($this->library->isLoggedIn()); $this->assertTrue($this->library->isLoggedIn());
} }
} }

Loading…
Cancel
Save