Implement tests
This commit is contained in:
parent
41129829e6
commit
39bb2c2adb
1 changed files with 19 additions and 1 deletions
|
@ -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()
|
||||||
|
|
Loading…
Add table
Reference in a new issue