diff options
Diffstat (limited to 'tests/unit/Service/BoardServiceTest.php')
-rw-r--r-- | tests/unit/Service/BoardServiceTest.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/Service/BoardServiceTest.php b/tests/unit/Service/BoardServiceTest.php index 646df29e..96007cc2 100644 --- a/tests/unit/Service/BoardServiceTest.php +++ b/tests/unit/Service/BoardServiceTest.php @@ -35,6 +35,8 @@ use OCA\Deck\Db\CardMapper; use OCA\Deck\Db\ChangeHelper; use OCA\Deck\Db\LabelMapper; use OCA\Deck\Db\StackMapper; +use OCA\Deck\Event\AclCreatedEvent; +use OCA\Deck\Event\AclDeletedEvent; use OCA\Deck\NoPermissionException; use OCA\Deck\Notification\NotificationHelper; use OCP\EventDispatcher\IEventDispatcher; @@ -375,6 +377,9 @@ class BoardServiceTest extends TestCase { ->method('insert') ->with($acl) ->willReturn($acl); + $this->eventDispatcher->expects(self::once()) + ->method('dispatchTyped') + ->with(new AclCreatedEvent($acl)); $this->assertEquals($expected, $this->service->addAcl( 123, 'user', 'admin', $providedAcl[0], $providedAcl[1], $providedAcl[2] )); @@ -432,6 +437,9 @@ class BoardServiceTest extends TestCase { ->method('delete') ->with($acl) ->willReturn($acl); + $this->eventDispatcher->expects(self::once()) + ->method('dispatchTyped') + ->with(new AclDeletedEvent($acl)); $this->assertEquals($acl, $this->service->deleteAcl(123)); } } |