mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 12:34:13 +00:00
34 lines
669 B
PHP
34 lines
669 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()
|
|
{
|
|
$this->postJson('/api/register', [
|
|
'name' => 'Test User',
|
|
'email' => $this->marking->email,
|
|
'password' => 'secret',
|
|
'password_confirmation' => 'secret',
|
|
'marking' => $this->marking->marking
|
|
])
|
|
->assertSuccessful();
|
|
}
|
|
}
|