Files
exchange/tests/Unit/BookingTest.php
T
2018-05-24 15:14:33 +08:00

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);
}
}