diff --git a/tests/Feature/Wizard/CompaniesTest.php b/tests/Feature/Wizard/CompaniesTest.php new file mode 100644 index 000000000..4e43f77e4 --- /dev/null +++ b/tests/Feature/Wizard/CompaniesTest.php @@ -0,0 +1,37 @@ +loginAs() + ->get(route('wizard.companies.edit')) + ->assertStatus(200) + ->assertSeeText(trans('modules.api_key')); + } + + public function testItShouldUpdateCompany() + { + $request = $this->getRequest(); + + $this->loginAs() + ->patch(route('wizard.companies.update'), $request) + ->assertStatus(200); + + $this->assertFlashLevel('success'); + } + + public function getRequest() + { + return [ + 'financial_start' => '01-04', + 'address' => $this->faker->address, + 'tax_number' => $this->faker->randomNumber(9), + 'logo' => UploadedFile::fake()->create('image.jpg'), + ]; + } +}