Browse Source

updated UserTest

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

3
tests/Aauth/Libraries/Aauth/UserTest.php

@ -69,11 +69,13 @@ class UserTest extends CIDatabaseTestCase
$this->library = new Aauth(NULL, $session); $this->library = new Aauth(NULL, $session);
$this->seeInDatabase($this->config->dbTableUsers, [ $this->seeInDatabase($this->config->dbTableUsers, [
'id' => 2,
'email' => 'user@example.com', 'email' => 'user@example.com',
'username' => 'user', 'username' => 'user',
]); ]);
$this->library->updateUser(2, 'user1@example.com', 'password987654', 'user1'); $this->library->updateUser(2, 'user1@example.com', 'password987654', 'user1');
$this->seeInDatabase($this->config->dbTableUsers, [ $this->seeInDatabase($this->config->dbTableUsers, [
'id' => 2,
'email' => 'user1@example.com', 'email' => 'user1@example.com',
'username' => 'user1', 'username' => 'user1',
]); ]);
@ -81,6 +83,7 @@ class UserTest extends CIDatabaseTestCase
$this->library->clearInfos(); $this->library->clearInfos();
$this->assertFalse($this->library->updateUser(2, 'admin@example.com', null, null)); $this->assertFalse($this->library->updateUser(2, 'admin@example.com', null, null));
print_r($this->library->getUser(2));
$this->assertEquals(lang('Aauth.existsAlreadyEmail'), $this->library->getErrorsArray()[0]); $this->assertEquals(lang('Aauth.existsAlreadyEmail'), $this->library->getErrorsArray()[0]);
$this->library->clearErrors(); $this->library->clearErrors();

Loading…
Cancel
Save