add team delte
CI/CD / test_and_check_app (push) Failing after 55s
CI/CD / Publish immutable image (push) Skipped

This commit is contained in:
2026-09-29 21:39:26 +02:00
parent f6831a02a2
commit 0ea78a621a
7 changed files with 57 additions and 20 deletions
+2 -2
View File
@@ -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]);
});