2018-10-04 16:00:15 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Tests\Feature;
|
|
|
|
|
|
|
|
use Tests\TestCase;
|
2019-01-31 01:39:51 +00:00
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
|
|
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
2018-10-04 16:00:15 +00:00
|
|
|
|
|
|
|
class LoginTest extends TestCase
|
|
|
|
{
|
|
|
|
|
|
|
|
/** @test */
|
|
|
|
public function view_login_page()
|
|
|
|
{
|
|
|
|
$response = $this->get('login');
|
|
|
|
|
2019-01-31 01:39:51 +00:00
|
|
|
$response->assertSee('Forgot Your Password?');
|
2018-10-04 16:00:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/** @test */
|
|
|
|
public function view_register_page()
|
|
|
|
{
|
2019-01-31 01:39:51 +00:00
|
|
|
if(true == config('pixelfed.open_registration')) {
|
2018-10-04 21:20:51 +00:00
|
|
|
$response = $this->get('register');
|
2018-10-04 16:00:15 +00:00
|
|
|
|
2019-01-31 01:39:51 +00:00
|
|
|
$response->assertSee('Register a new account');
|
2018-10-04 21:20:51 +00:00
|
|
|
} else {
|
2018-11-29 05:11:07 +00:00
|
|
|
$response = $this->get('register');
|
|
|
|
|
2019-01-31 01:39:51 +00:00
|
|
|
$response->assertSee('Registration is closed');
|
2018-10-04 21:20:51 +00:00
|
|
|
}
|
2018-10-04 16:00:15 +00:00
|
|
|
}
|
|
|
|
}
|