diff --git a/app/Utils/Traits/Uploadable.php b/app/Utils/Traits/Uploadable.php index fd6d10b85f..00e563267c 100644 --- a/app/Utils/Traits/Uploadable.php +++ b/app/Utils/Traits/Uploadable.php @@ -20,10 +20,10 @@ trait Uploadable { public function uploadLogo($file, $company, $entity) { - if(($file) + if($file) { - $path = UploadAvatar::dispatchNow(($file, $company->company_key); + $path = UploadAvatar::dispatchNow($file, $company->company_key); if($path){ diff --git a/tests/Feature/CompanyTest.php b/tests/Feature/CompanyTest.php index cd18aac9ad..32cb238906 100644 --- a/tests/Feature/CompanyTest.php +++ b/tests/Feature/CompanyTest.php @@ -95,7 +95,7 @@ class CompanyTest extends TestCase ])->post('/api/v1/companies/', [ 'name' => 'A New Company', - 'logo' => UploadedFile::fake()->create('avatar.pdf',100) + 'company_logo' => UploadedFile::fake()->create('avatar.pdf',100) ] ) ->assertStatus(302); diff --git a/tests/Integration/UploadLogoTest.php b/tests/Integration/UploadLogoTest.php index 487290dfcd..770150f568 100644 --- a/tests/Integration/UploadLogoTest.php +++ b/tests/Integration/UploadLogoTest.php @@ -61,6 +61,7 @@ class UploadLogoTest extends TestCase $response->assertStatus(200); $acc = $response->json(); + \Log::error($acc); $logo = $acc['data']['settings']['company_logo_url']; $logo_file = Storage::url($logo); @@ -76,7 +77,7 @@ class UploadLogoTest extends TestCase Storage::fake('avatars'); $data = [ - 'logo' => "", + 'company_logo' => "", 'name' => 'TestCompany' ];