mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
rename image_url to image_path in user_bank_slip,invoice,purchase_order
This commit is contained in:
@@ -74,15 +74,15 @@ class BookingTest extends TestCase
|
||||
public function testuploadbankslip()
|
||||
{
|
||||
Storage::fake('file');
|
||||
$bankslip_url = UploadedFile::fake()->image('comp.jpg');
|
||||
$bankslip_path = UploadedFile::fake()->image('comp.jpg');
|
||||
|
||||
if(!file_exists($bankslip_url)){
|
||||
if(!file_exists($bankslip_path)){
|
||||
$response->assertStatus(400);
|
||||
}
|
||||
|
||||
$this->actingAs($this->user)
|
||||
->json('POST', '/api/booking/' . $this->booking->id . '/upload-user-bankslip', [
|
||||
'file' => $bankslip_url
|
||||
'file' => $bankslip_path
|
||||
])
|
||||
->assertSuccessful();
|
||||
}
|
||||
@@ -98,16 +98,16 @@ class BookingTest extends TestCase
|
||||
|
||||
public function testuploadPO()
|
||||
{
|
||||
Storage::fake('image_url');
|
||||
$image_url = UploadedFile::fake()->image('comp.jpg');
|
||||
Storage::fake('file');
|
||||
$image_path = UploadedFile::fake()->image('comp.jpg');
|
||||
|
||||
if(!file_exists($image_url)){
|
||||
if(!file_exists($image_path)){
|
||||
$response->assertStatus(400);
|
||||
}
|
||||
|
||||
$this->actingAs($this->user)
|
||||
->json('POST', '/api/booking/' . $this->booking->id . '/upload-po', [
|
||||
'file' => $image_url,
|
||||
'file' => $image_path,
|
||||
'amount' => '12345'
|
||||
])
|
||||
->assertSuccessful();
|
||||
@@ -141,16 +141,16 @@ class BookingTest extends TestCase
|
||||
$this->user->roles()->sync([]);
|
||||
$this->user->attachRole(Role::Where('name','admin')->first());
|
||||
|
||||
Storage::fake('invoice_url');
|
||||
$invoice_url = UploadedFile::fake()->create('document.pdf');
|
||||
Storage::fake('invoice_path');
|
||||
$invoice_path = UploadedFile::fake()->create('document.pdf');
|
||||
|
||||
if(!file_exists($invoice_url)){
|
||||
if(!file_exists($invoice_path)){
|
||||
$response->assertStatus(400);
|
||||
}
|
||||
|
||||
$this->actingAs($this->user)
|
||||
->json('POST', '/api/booking/' . $this->booking->id . '/upload-invoice', [
|
||||
'invoice_url' => $invoice_url,
|
||||
'invoice_path' => $invoice_path,
|
||||
'amount' => '12345'
|
||||
])
|
||||
->assertSuccessful();
|
||||
|
||||
Reference in New Issue
Block a user