summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@pardus.de>2010-02-21 09:08:52 (GMT)
committerGunnar Wrobel <wrobel@pardus.de>2010-02-21 09:08:52 (GMT)
commit40220098e4d180d284378259c23e9d91a771273b (patch)
tree5869ee01c0a4fa16315205fa4472b1068fd4112d /test
parent1a6768be7adab331e2149a808c431ab54daa035d (diff)
downloadkolab-webadmin-40220098e4d180d284378259c23e9d91a771273b.tar.gz
Test counting with an existing user. Fix generation of the mail address when adding users.
Diffstat (limited to 'test')
-rw-r--r--test/KolabAdmin/Unit/BaseTest.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/KolabAdmin/Unit/BaseTest.php b/test/KolabAdmin/Unit/BaseTest.php
index d75f49b..b91eaed 100644
--- a/test/KolabAdmin/Unit/BaseTest.php
+++ b/test/KolabAdmin/Unit/BaseTest.php
@@ -64,6 +64,18 @@ class KolabAdmin_Unit_BaseTest extends PHPUnit_Framework_TestCase
);
}
+ public function testCountmailReturnsOneOnExistingMail()
+ {
+ $this->_add($this->_getTestUser());
+ $this->assertEquals(
+ 1,
+ $this->ldap->countMail(
+ $_SESSION['base_dn'],
+ 'kolabadmin.test.@' . $_SESSION['fqdnhostname']
+ )
+ );
+ }
+
public function testAddingObjectIsSuccessful()
{
$this->_add($this->_getTestUser());
@@ -90,7 +102,7 @@ class KolabAdmin_Unit_BaseTest extends PHPUnit_Framework_TestCase
'sn' => 'TestUser' . $id,
'cn' => 'KolabAdmin TestUser' . $id,
'givenName' => 'KolabAdmin',
- 'mail' => 'kolabadmin.test.' . $id . $_SESSION['base_dn'],
+ 'mail' => 'kolabadmin.test.' . $id . '@' . $_SESSION['fqdnhostname'],
'uid' => 'kolabadmin.test.' . $id,
)
);