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

Added testing for webhook management interface

This commit is contained in:
Dan Brown
2021-12-10 14:54:58 +00:00
parent 8716b1922b
commit 6381041252
5 changed files with 204 additions and 3 deletions

View File

@ -1,11 +1,15 @@
<?php
namespace Database\Factories;
namespace Database\Factories\Actions;
use BookStack\Actions\Webhook;
use Illuminate\Database\Eloquent\Factories\Factory;
class WebhookFactory extends Factory
{
protected $model = Webhook::class;
/**
* Define the model's default state.
*

View File

@ -0,0 +1,23 @@
<?php
namespace Database\Factories;
use BookStack\Actions\ActivityType;
use BookStack\Actions\Webhook;
use Illuminate\Database\Eloquent\Factories\Factory;
class WebhookTrackedEventFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'webhook_id' => Webhook::factory(),
'event' => ActivityType::all()[array_rand(ActivityType::all())],
];
}
}