mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Implement tests
This commit is contained in:
parent
41129829e6
commit
39bb2c2adb
|
@ -19,7 +19,25 @@ class CreateNotesTest extends TestCase
|
|||
|
||||
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()
|
||||
|
|
Loading…
Reference in a new issue