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