Implement tests

This commit is contained in:
Marcus Moore 2025-02-20 12:49:58 -08:00
parent 41129829e6
commit 39bb2c2adb
No known key found for this signature in database

View file

@ -19,7 +19,25 @@ class CreateNotesTest extends TestCase
public function testValidation() public function testValidation()
{ {
$this->markTestIncomplete(); $asset = Asset::factory()->create();
$this->actingAs(User::factory()->editAssets()->create())
->post(route('notes.store'), [
'id' => $asset->id,
// should be more...
])
->assertSessionHas('errors');
}
public function testAssetMustExist()
{
$this->actingAs(User::factory()->editAssets()->create())
->post(route('notes.store'), [
'id' => 999_999,
'type' => 'asset',
'note' => 'my note',
])
->assertStatus(404);
} }
public function testCanCreateNoteForAsset() public function testCanCreateNoteForAsset()