mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-21 21:34:16 +00:00
upload purchase order
This commit is contained in:
@@ -6,6 +6,9 @@ use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Artisan;
|
||||
use App\User;
|
||||
|
||||
@@ -22,17 +25,17 @@ class BookingTest extends TestCase
|
||||
|
||||
public function testPost()
|
||||
{
|
||||
$response =
|
||||
$response =
|
||||
$this->actingAs($this->user)
|
||||
->postJson('/api/booking/', [
|
||||
'account_name' => 'johnny',
|
||||
'account_num' => '1234567',
|
||||
'bank_name' => 'myabnak',
|
||||
'bank_branch' => 'banking',
|
||||
'company_name' => 'besaras',
|
||||
'company_address' => 'californina',
|
||||
'bank_address' => 'cyber',
|
||||
'swift_code' => '123wert',
|
||||
'account_num' => '1234567',
|
||||
'bank_name' => 'myabnak',
|
||||
'bank_branch' => 'banking',
|
||||
'company_name' => 'besaras',
|
||||
'company_address' => 'californina',
|
||||
'bank_address' => 'cyber',
|
||||
'swift_code' => '123wert',
|
||||
'cnap' => '2131rew',
|
||||
'term' => 'x2_cash',
|
||||
'amount' => '14000'
|
||||
@@ -40,4 +43,23 @@ class BookingTest extends TestCase
|
||||
$response->assertStatus(500);
|
||||
}
|
||||
|
||||
public function testImageUpload()
|
||||
{
|
||||
Storage::fake('bankslip_url');
|
||||
|
||||
$response = $this->json('POST', '/api/upload-bs', [
|
||||
'bankslip_url' => UploadedFile::fake()->image('comp.jpg'),
|
||||
'bank_slip_type' => '',
|
||||
'transfer_amount' => '1000',
|
||||
'book_id' => '1',
|
||||
'cust_marking' => '12345',
|
||||
'is_approve' => '1',
|
||||
|
||||
]);
|
||||
//var_dump($response);
|
||||
dd($response->getContent());
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user