add team delte
This commit is contained in:
@@ -65,7 +65,7 @@ test('unverified users cannot create teams', function (string $method, string $r
|
||||
$this->assertDatabaseCount('teams', 0);
|
||||
})->with([['get', 'teams.create'], ['post', 'teams.store']]);
|
||||
|
||||
test('team creation derives the slug and adds its creator as admin', function () {
|
||||
test('team creation derives the slug and adds its creator as owner', function () {
|
||||
$user = User::factory()->create();
|
||||
|
||||
$this->actingAs($user)->post(route('teams.store'), [
|
||||
@@ -73,7 +73,7 @@ test('team creation derives the slug and adds its creator as admin', function ()
|
||||
])->assertSessionHasNoErrors()->assertRedirect(route('teams.index'));
|
||||
|
||||
$this->assertDatabaseHas('teams', ['name' => 'Test Team', 'slug' => 'test-team', 'require_2fa' => true]);
|
||||
$this->assertDatabaseHas('team_members', ['user_id' => $user->id, 'role' => 'admin']);
|
||||
$this->assertDatabaseHas('team_members', ['user_id' => $user->id, 'role' => 'owner']);
|
||||
$this->assertDatabaseMissing('teams', ['id' => 999]);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user