Skip to content

Commit

Permalink
Improve stub
Browse files Browse the repository at this point in the history
  • Loading branch information
Braden Keith committed Jan 25, 2022
1 parent 960c286 commit 469b90a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/Commands/stubs/ResourceTest.stub
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ class DummyClass extends NovaResourceTestCase
*/
public function it_fails_to_store_this_resource_without_all_required_fields($saveMethod)
{
$this->setNullValuesOn($required = [])
$this->setNullValuesOn($required = [
'name',
])
->$saveMethod()
->assertRequiredFields($required)
->assertNovaFailed();
Expand All @@ -67,7 +69,9 @@ class DummyClass extends NovaResourceTestCase
/** @test */
public function it_can_update_this_resource()
{
$response = $this->updateResource(['name' => $name = 'Vader'])
$response = $this->updateResource([
'name' => $name = 'Vader',
])
->assertOk();

$this->assertDatabaseHas((new {{ modelName }})->getTable(), [
Expand All @@ -83,6 +87,14 @@ class DummyClass extends NovaResourceTestCase
->assertOk();
}

/** @test **/
public function it_has_relationships()
{
// $this->assertHasManyRelationships([
// 'product',
// ]);
}

public function storeMethodProvider()
{
return [
Expand Down

0 comments on commit 469b90a

Please sign in to comment.