A free open source IT asset/license management system
Implement tests
Marcus Moore39bb2c2adbd2
diff --git a/tests/Feature/Notes/CreateNotesTest.php b/tests/Feature/Notes/CreateNotesTest.phpindex fac13c1ac8..84c8ec34bf 100644--- a/tests/Feature/Notes/CreateNotesTest.php+++ b/tests/Feature/Notes/CreateNotesTest.php@@ -19,7 +19,25 @@ class CreateNotesTest extends TestCasepublic 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()