summaryrefslogtreecommitdiff
path: root/tests/units/UserTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/UserTest.php')
-rw-r--r--tests/units/UserTest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/units/UserTest.php b/tests/units/UserTest.php
index c4094ea2..a946621c 100644
--- a/tests/units/UserTest.php
+++ b/tests/units/UserTest.php
@@ -10,6 +10,16 @@ use Model\Project;
class UserTest extends Base
{
+ public function testGetByEmail()
+ {
+ $u = new User($this->container);
+ $this->assertNotFalse($u->create(array('username' => 'user1', 'password' => '123456', 'email' => 'user1@localhost')));
+ $this->assertNotFalse($u->create(array('username' => 'user2', 'password' => '123456', 'email' => '')));
+
+ $this->assertNotEmpty($u->getByEmail('user1@localhost'));
+ $this->assertEmpty($u->getByEmail(''));
+ }
+
public function testPassword()
{
$password = 'test123';