mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
32 lines
645 B
PHP
32 lines
645 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Tests\TestCase;
|
|
use App\Marking;
|
|
use Artisan;
|
|
|
|
class RegisterTest extends TestCase
|
|
{
|
|
protected $marking;
|
|
|
|
public function setUp(){
|
|
parent::setUp();
|
|
Artisan::call('db:seed');
|
|
$this->marking = factory(Marking::class)->create();
|
|
}
|
|
|
|
|
|
/** @test */
|
|
public function can_register()
|
|
{
|
|
$response = $this->postJson('/api/register', [
|
|
'email' => $this->marking->email,
|
|
'password' => 'secret',
|
|
'password_confirmation' => 'secret',
|
|
'marking' => $this->marking->marking
|
|
])
|
|
->assertSuccessful();
|
|
}
|
|
}
|