Add failing tests

This commit is contained in:
Marcus Moore 2025-03-27 10:56:33 -07:00
parent e0e08f284e
commit c095f330e1
No known key found for this signature in database
2 changed files with 6 additions and 1 deletions

View file

@ -33,12 +33,14 @@ class CreateCompaniesTest extends TestCase implements TestsPermissionsRequiremen
$this->actingAsForApi(User::factory()->createCompanies()->create())
->postJson(route('api.companies.store'), [
'name' => 'My Cool Company',
'notes' => 'A Cool Note',
])
->assertStatus(200)
->assertStatusMessageIs('success');
$this->assertDatabaseHas('companies', [
'name' => 'My Cool Company',
'notes' => 'A Cool Note',
]);
}
}

View file

@ -41,10 +41,13 @@ class UpdateCompaniesTest extends TestCase
$this->actingAsForApi(User::factory()->editCompanies()->create())
->patchJson(route('api.companies.update', ['company' => $company->id]), [
'name' => 'A Changed Name',
'notes' => 'A Changed Note',
])
->assertStatus(200)
->assertStatusMessageIs('success');
$this->assertEquals('A Changed Name', $company->fresh()->name);
$company->refresh();
$this->assertEquals('A Changed Name', $company->name);
$this->assertEquals('A Changed Note', $company->notes);
}
}