Skip to content

Commit

Permalink
Fix template api test
Browse files Browse the repository at this point in the history
  • Loading branch information
mako321 committed Apr 4, 2022
1 parent bf851ea commit bb193d8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tests/Api/TemplateApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,10 @@ public function testManuallyTriggeredEvent(): void

$admin = $this->makeAdmin();
$this->response = $this->actingAs($admin, 'api')->postJson(
'/api/admin/events/trigger-manually',
'/api/admin/events/trigger-manually/' . $template->getKey(),
['users' => [$this->tutor->getKey()]]
)->assertOk();

Event::assertDispatched(ManuallyTriggeredEvent::class, function (ManuallyTriggeredEvent $event) {
$this->assertEquals($this->tutor->getKey(), $event->getUser()->getKey());
return true;
});

$listener = app(TemplateEventListener::class);
$listener->handle(new ManuallyTriggeredEvent($this->tutor));

Expand Down

0 comments on commit bb193d8

Please sign in to comment.