21 lines
577 B
PHP
21 lines
577 B
PHP
|
<?php
|
||
|
|
||
|
namespace Tests\Feature;
|
||
|
|
||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||
|
use Illuminate\Foundation\Testing\WithFaker;
|
||
|
use Tests\TestCase;
|
||
|
|
||
|
class RegistrationTest extends TestCase
|
||
|
{
|
||
|
/**
|
||
|
* A basic test .to make sure that user registration works
|
||
|
*/
|
||
|
public function test_user_can_register()
|
||
|
{
|
||
|
$this->post("/register", ["email" => "a@a.com", "username" => "aaa", "password" => "password"])->assertRedirect();
|
||
|
$this->post("/login", ["email" => "a@a.com", "username" => "aaa", "password" => "password"])->assertRedirect("/");
|
||
|
|
||
|
}
|
||
|
}
|