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:
parent
cc85746af0
commit
7a78702a1f
@ -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){
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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'
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user