diff --git a/tests/Feature/CompanyTest.php b/tests/Feature/CompanyTest.php new file mode 100644 index 0000000..aaea546 --- /dev/null +++ b/tests/Feature/CompanyTest.php @@ -0,0 +1,39 @@ +assertEquals($json['error'], 'The company name is empty, please, write the name!!!'); + } + + public function test_not_existing_company_with_name(): void + { + $name = '404 Company'; + + $json = Company::validate_with_name($name); + + $this->assertEquals($json['error'], 'A company with the name does not exist!!!'); + } + + public function test_valid_company_with_name(): void + { + $name = 'testCompany'; + + $json = Company::validate_with_name($name); + + $this->assertEquals($json['ok'], 'A company with the name is valid.'); + } +}