assert an org is created
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use function PHPUnit\Framework\assertTrue;
|
||||||
|
|
||||||
test('registration screen can be rendered', function () {
|
test('registration screen can be rendered', function () {
|
||||||
$response = $this->get('/register');
|
$response = $this->get('/register');
|
||||||
|
|
||||||
@@ -15,5 +17,9 @@ test('new users can register', function () {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertAuthenticated();
|
$this->assertAuthenticated();
|
||||||
|
|
||||||
|
assertTrue(auth()->user()->organisations()->count() === 1);
|
||||||
|
assertTrue(auth()->user()->ownedOrganisations()->count() === 1);
|
||||||
|
|
||||||
$response->assertRedirect(route('dashboard', absolute: false));
|
$response->assertRedirect(route('dashboard', absolute: false));
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user