assert an org is created

This commit is contained in:
2025-03-27 13:43:20 +00:00
parent a4f2dcf7fd
commit 891079fd99

View File

@@ -1,5 +1,7 @@
<?php
use function PHPUnit\Framework\assertTrue;
test('registration screen can be rendered', function () {
$response = $this->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));
});