pai-sklep/tests/Feature/RegistrationTest.php

21 lines
577 B
PHP
Raw Normal View History

2021-09-05 02:22:17 +02:00
<?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("/");
}
}