pai-sklep/tests/Feature/RegistrationTest.php
2021-11-14 14:51:49 +01:00

19 lines
576 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("/");
}
}