1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Fixed tests, applied StyleCI changes

This commit is contained in:
Dan Brown
2022-03-26 20:38:03 +00:00
parent 3625f12abe
commit b5281bc9ca
5 changed files with 17 additions and 14 deletions

View File

@ -16,9 +16,9 @@ class WebhookFormatTesting extends TestCase
public function test_entity_events_show_related_user_info()
{
$events = [
ActivityType::BOOK_UPDATE => Book::query()->first(),
ActivityType::BOOK_UPDATE => Book::query()->first(),
ActivityType::CHAPTER_CREATE => Chapter::query()->first(),
ActivityType::PAGE_MOVE => Page::query()->first(),
ActivityType::PAGE_MOVE => Page::query()->first(),
];
foreach ($events as $event => $entity) {
@ -47,6 +47,7 @@ class WebhookFormatTesting extends TestCase
$webhook = Webhook::factory()->make();
$user = $this->getEditor();
$formatter = WebhookFormatter::getDefault($event, $webhook, $detail, $user, time());
return $formatter->format();
}
}
}

View File

@ -186,7 +186,7 @@ class ThemeTest extends TestCase
dispatch((new DispatchWebhookJob($webhook, $event, $detail)));
$this->assertCount(3, $args);
$this->assertCount(5, $args);
$this->assertEquals($event, $args[0]);
$this->assertEquals($webhook->id, $args[1]->id);
$this->assertEquals($detail->id, $args[2]->id);