From 9442714086e5abe53fa75f1b8e6d530ff0bc5593 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Wed, 7 Jun 2023 21:39:29 +0200 Subject: [PATCH] Add indexTest for mailgateway --- tests/Feature/Mailgateway/IndexTest.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/Feature/Mailgateway/IndexTest.php b/tests/Feature/Mailgateway/IndexTest.php index 1bbd90f8..2eb531bc 100644 --- a/tests/Feature/Mailgateway/IndexTest.php +++ b/tests/Feature/Mailgateway/IndexTest.php @@ -44,10 +44,22 @@ class IndexTest extends TestCase $response = $this->get('/setting/mailgateway'); - $this->assertInertiaHas(route('api.mailgateway.store'), $response, 'data.meta.links.store'); + $this->assertInertiaHas(route('mailgateway.store'), $response, 'data.meta.links.store'); + $this->assertInertiaHas([ + 'id' => null, + 'name' => '-- kein --', + ], $response, 'data.meta.types.0'); $this->assertInertiaHas([ 'id' => LocalType::class, 'name' => 'Lokal', - ], $response, 'data.meta.types.0'); + ], $response, 'data.meta.types.1'); + $this->assertInertiaHas([ + 'domain' => '', + 'name' => '', + 'type' => [ + 'params' => [], + 'cls' => null, + ], + ], $response, 'data.meta.default'); } }