3 changed files with 6 additions and 5 deletions
@ -69,13 +69,11 @@ class UserTest extends CIDatabaseTestCase
|
||||
$this->library = new Aauth(NULL, $session); |
||||
|
||||
$this->seeInDatabase($this->config->dbTableUsers, [ |
||||
'id' => 2, |
||||
'email' => '[email protected]', |
||||
'username' => 'user', |
||||
]); |
||||
$this->library->updateUser(2, '[email protected]', 'password987654', 'user1'); |
||||
$this->seeInDatabase($this->config->dbTableUsers, [ |
||||
'id' => 2, |
||||
'email' => '[email protected]', |
||||
'username' => 'user1', |
||||
]); |
||||
@ -116,9 +114,9 @@ class UserTest extends CIDatabaseTestCase
|
||||
|
||||
public function testDeleteUser() |
||||
{ |
||||
$this->seeNumRecords(2, $this->config->dbTableUsers, []); |
||||
$this->seeNumRecords(2, $this->config->dbTableUsers, ['deleted' => 0]); |
||||
$this->library->deleteUser(2); |
||||
$this->seeNumRecords(1, $this->config->dbTableUsers, []); |
||||
$this->seeNumRecords(1, $this->config->dbTableUsers, ['deleted' => 0]); |
||||
|
||||
$this->assertFalse($this->library->deleteUser(99)); |
||||
$this->assertEquals(lang('Aauth.notFoundUser'), $this->library->getErrorsArray()[0]); |
||||
|
Loading…
Reference in new issue