1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

Fixes for tests

This commit is contained in:
David Bomba 2019-10-08 07:43:25 +10:00
parent cc85746af0
commit 7a78702a1f
3 changed files with 5 additions and 4 deletions

View File

@ -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){

View File

@ -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);

View File

@ -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'
];