renamed again for git to accept case

This commit is contained in:
snipe 2021-12-02 14:00:27 -08:00
parent 00b63fe7c7
commit 5555553307
99 changed files with 5 additions and 4 deletions

View file

@ -6,6 +6,7 @@ use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Tests\Unit\BaseTest;
use App\Models\Company;
class CompanyTest extends BaseTest
{
@ -17,13 +18,13 @@ class CompanyTest extends BaseTest
public function testFailsEmptyValidation()
{
// An Company requires a name, a qty, and a category_id.
$a = Company::create();
$this->assertFalse($a->isValid());
$company = Company::factory()->assetDesktopCategory()->create();
$this->assertFalse($company->isValid());
$fields = [
'name' => 'name',
];
$errors = $a->getErrors();
$errors = $company->getErrors();
foreach ($fields as $field => $fieldTitle) {
$this->assertEquals($errors->get($field)[0], "The ${fieldTitle} field is required.");
}
@ -31,7 +32,7 @@ class CompanyTest extends BaseTest
public function testACompanyCanHaveUsers()
{
$company = $this->createValidCompany();
$company = Category::factory()->assetDesktopCategory()->create();
$user = $this->createValidUser(['company_id'=>$company->id]);
$this->assertCount(1, $company->users);
}