From 891079fd9937fcdbde63458587d22d2597f6b45b Mon Sep 17 00:00:00 2001 From: "Harry (hjbdev)" Date: Thu, 27 Mar 2025 13:43:20 +0000 Subject: [PATCH] assert an org is created --- tests/Feature/Auth/RegistrationTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/Feature/Auth/RegistrationTest.php b/tests/Feature/Auth/RegistrationTest.php index f1d859c..5c184ea 100644 --- a/tests/Feature/Auth/RegistrationTest.php +++ b/tests/Feature/Auth/RegistrationTest.php @@ -1,5 +1,7 @@ get('/register'); @@ -15,5 +17,9 @@ test('new users can register', function () { ]); $this->assertAuthenticated(); + + assertTrue(auth()->user()->organisations()->count() === 1); + assertTrue(auth()->user()->ownedOrganisations()->count() === 1); + $response->assertRedirect(route('dashboard', absolute: false)); }); \ No newline at end of file