Handle circle deletion event and add cleanup job
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user