commit5
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-30 10:55:18 +02:00
parent 0235c7609e
commit 48347e2d3a
161 changed files with 11814 additions and 265 deletions
+2 -2
View File
@@ -63,8 +63,8 @@ beforeEach(function () {
test('an unassigned account can create an isolated company and becomes its administrator', function () {
$user = User::factory()->create();
$this->actingAs($user)->post('/empresa/iniciar', ['name' => 'Nova empresa', 'department' => 'Geral'])->assertRedirect('/dashboard');
expect($user->refresh()->purchasing_role)->toBe(PurchasingRole::Admin);
$this->actingAs($user)->post('/empresa/iniciar', ['name' => 'Nova empresa', 'department' => 'Geral', 'first_limit' => '1000.00', 'second_limit' => '2000.00', 'includes_tax' => true, 'second_name' => 'Segundo administrador QA', 'second_email' => 'segundo-admin-qa@example.test', 'second_password' => 'Example-password-234!', 'second_password_confirmation' => 'Example-password-234!'])->assertRedirect('/dashboard');
expect($user->refresh()->hasFunctions(['admin']))->toBeTrue()->and($user->purchasing_role)->toBe(PurchasingRole::Configured);
expect($user->tenant_id)->not->toBe($this->tenant->id);
$this->actingAs($user)->post('/empresa/iniciar', ['name' => 'Outra empresa', 'department' => 'Geral'])->assertForbidden();
});