From ed966b02eb24b0a4fdbc93c2bd661aebf6940a99 Mon Sep 17 00:00:00 2001 From: harshjagad20 Date: Tue, 1 Jun 2021 16:32:06 +0530 Subject: [PATCH] Added test for negative taxtype test --- tests/Feature/TaxTypeTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Feature/TaxTypeTest.php b/tests/Feature/TaxTypeTest.php index 010ff409..e587b0dd 100644 --- a/tests/Feature/TaxTypeTest.php +++ b/tests/Feature/TaxTypeTest.php @@ -92,3 +92,14 @@ test('delete tax type', function () { $this->assertDeleted($taxType); }); + + +test('create negative tax type', function () { + $taxType = TaxType::factory()->raw([ + 'percent' => -9.99 + ]); + + postJson('api/v1/tax-types', $taxType)->assertOk(); + + $this->assertDatabaseHas('tax_types', $taxType); +});