mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 20:34:08 +00:00
50 lines
1.3 KiB
PHP
50 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace Tests\Unit\BookingTest;
|
|
|
|
use App\User;
|
|
use Artisan;
|
|
use Tests\TestCase;
|
|
|
|
class BookingTest extends TestCase
|
|
{
|
|
protected $user;
|
|
|
|
public function setUp()
|
|
{
|
|
parent::setUp();
|
|
Artisan::call('db:seed');
|
|
$this->user = factory(User::class)->create();
|
|
}
|
|
|
|
public function testPost()
|
|
{
|
|
$response =
|
|
$this->actingAs($this->user)
|
|
->postJson('/api/booking/', [
|
|
'term' => 'x1_ba',
|
|
'account_name' => 'johnny',
|
|
'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',
|
|
'rmb_book_amount' => 14000,
|
|
'rmb_book_pay_method' => 'x1_ba',
|
|
'rmb_book_account_name' => 'Xiao Xue',
|
|
'rmb_book_acc_no' => '12332123123',
|
|
'rmb_book_bank_branch' => 'ShenZhen',
|
|
'amount' => 14000,
|
|
]);
|
|
dd($response->getContent());
|
|
$response->assertStatus(200);
|
|
|
|
}
|
|
|
|
|
|
}
|