mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
929266a09c
phpfmt booking controller removed example test moved booking test to feature
43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Tests\Unit\BookingTest;
|
|
|
|
use Tests\TestCase;
|
|
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
|
use Artisan;
|
|
use App\User;
|
|
|
|
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/', [
|
|
'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',
|
|
'amount' => '14000'
|
|
]);
|
|
$response->assertStatus(500);
|
|
}
|
|
|
|
} |