From 5531d90a57122b5bf311653553272a0a1a55874c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Tue, 25 Oct 2022 00:08:31 +0300 Subject: [PATCH] removed wizard taxes test --- tests/Feature/Wizard/TaxesTest.php | 79 ------------------------------ 1 file changed, 79 deletions(-) delete mode 100644 tests/Feature/Wizard/TaxesTest.php diff --git a/tests/Feature/Wizard/TaxesTest.php b/tests/Feature/Wizard/TaxesTest.php deleted file mode 100644 index f01fb8863..000000000 --- a/tests/Feature/Wizard/TaxesTest.php +++ /dev/null @@ -1,79 +0,0 @@ -loginAs() - ->get(route('wizard.taxes.index')) - ->assertStatus(200) - ->assertSeeText(trans('general.wizard')); - } - - public function testItShouldCreateTax() - { - $request = $this->getRequest(); - - $message = trans('messages.success.added', ['type' => trans_choice('general.taxes', 1)]); - - $this->loginAs() - ->post(route('wizard.taxes.store'), $request) - ->assertStatus(200) - ->assertJson([ - 'success' => true, - 'message' => $message, - ]); - - $this->assertDatabaseHas('taxes', $request); - } - - public function testItShouldUpdateTax() - { - $request = $this->getRequest(); - - $tax = $this->dispatch(new CreateTax($request)); - - $request['name'] = $this->faker->text(15); - - $message = trans('messages.success.updated', ['type' => $request['name']]); - - $this->loginAs() - ->patch(route('wizard.taxes.update', $tax->id), $request) - ->assertStatus(200) - ->assertJson([ - 'success' => true, - 'message' => $message, - ]); - - $this->assertDatabaseHas('taxes', $request); - } - - public function testItShouldDeleteTax() - { - $request = $this->getRequest(); - - $tax = $this->dispatch(new CreateTax($request)); - - $message = trans('messages.success.deleted', ['type' => $tax->name]); - - $this->loginAs() - ->delete(route('wizard.taxes.destroy', $tax->id)) - ->assertStatus(200) - ->assertJson([ - 'success' => true, - 'message' => $message, - ]); - - $this->assertDatabaseHas('taxes', $request); - } - - public function getRequest() - { - return Tax::factory()->enabled()->raw(); - } -}