pai-sklep/tests/Feature/RegistrationTest.php
2021-09-10 09:41:55 +02:00

20 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("/");
}
}