mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 05:14:37 -04: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)
|
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){
|
if($path){
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ class CompanyTest extends TestCase
|
|||||||
])->post('/api/v1/companies/',
|
])->post('/api/v1/companies/',
|
||||||
[
|
[
|
||||||
'name' => 'A New Company',
|
'name' => 'A New Company',
|
||||||
'logo' => UploadedFile::fake()->create('avatar.pdf',100)
|
'company_logo' => UploadedFile::fake()->create('avatar.pdf',100)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
->assertStatus(302);
|
->assertStatus(302);
|
||||||
|
@ -61,6 +61,7 @@ class UploadLogoTest extends TestCase
|
|||||||
$response->assertStatus(200);
|
$response->assertStatus(200);
|
||||||
|
|
||||||
$acc = $response->json();
|
$acc = $response->json();
|
||||||
|
\Log::error($acc);
|
||||||
$logo = $acc['data']['settings']['company_logo_url'];
|
$logo = $acc['data']['settings']['company_logo_url'];
|
||||||
|
|
||||||
$logo_file = Storage::url($logo);
|
$logo_file = Storage::url($logo);
|
||||||
@ -76,7 +77,7 @@ class UploadLogoTest extends TestCase
|
|||||||
Storage::fake('avatars');
|
Storage::fake('avatars');
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'logo' => "",
|
'company_logo' => "",
|
||||||
'name' => 'TestCompany'
|
'name' => 'TestCompany'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user