mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
IcingaNotificationTest: add rendering test
This commit is contained in:
parent
c7bf68a70a
commit
ab90f51cfa
@ -112,6 +112,28 @@ class IcingaNotificationTest extends BaseTestCase
|
|||||||
$user2->delete();
|
$user2->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testRendersConfigurationWithRelatedUsers()
|
||||||
|
{
|
||||||
|
if ($this->skipForMissingDb()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$db = $this->getDb();
|
||||||
|
|
||||||
|
$user1 = $this->user1();
|
||||||
|
$user1->store($db);
|
||||||
|
|
||||||
|
$user2 = $this->user2();
|
||||||
|
$user2->store($db);
|
||||||
|
|
||||||
|
$n = $this->notification();
|
||||||
|
$n->users = array($user1->object_name, $user2->object_name);
|
||||||
|
|
||||||
|
$this->assertEquals(
|
||||||
|
$this->loadRendered('notification1'),
|
||||||
|
(string) $n
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function testLazyUsersCanBeSet()
|
public function testLazyUsersCanBeSet()
|
||||||
{
|
{
|
||||||
$n = $this->notification();
|
$n = $this->notification();
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
object Notification "___TEST___notification" {
|
||||||
|
users = [ "___TEST___user1", "___TEST___user2" ]
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user