mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
Fix tests
This commit is contained in:
parent
3a3f0e64c9
commit
13e1b51140
3 changed files with 15 additions and 16 deletions
|
@ -40,7 +40,7 @@ SESSION_SECURE_COOKIE=true
|
|||
API_BASE="/api/1/"
|
||||
API_SEARCH="/api/search"
|
||||
|
||||
OPEN_REGISTRATION=true
|
||||
OPEN_REGISTRATION=false
|
||||
RECAPTCHA_ENABLED=false
|
||||
ENFORCE_EMAIL_VERIFICATION=true
|
||||
|
||||
|
|
|
@ -3,23 +3,23 @@
|
|||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
|
||||
class InstalledTest extends TestCase
|
||||
{
|
||||
public function testLandingTest()
|
||||
/** @test */
|
||||
public function landing_page()
|
||||
{
|
||||
$response = $this->get('/');
|
||||
$response
|
||||
->assertStatus(200)
|
||||
->assertSeeText('Image Sharing for Everyone');
|
||||
$response->assertSeeText('Image Sharing for Everyone');
|
||||
}
|
||||
|
||||
public function testNodeinfoTest()
|
||||
/** @test */
|
||||
public function nodeinfo_api()
|
||||
{
|
||||
$response = $this->get('/.well-known/nodeinfo');
|
||||
$response
|
||||
->assertStatus(200)
|
||||
->assertJson([
|
||||
$response->assertJson([
|
||||
'links' => [
|
||||
['rel' => 'http://nodeinfo.diaspora.software/ns/schema/2.0'],
|
||||
], ]);
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
|
||||
class LoginTest extends TestCase
|
||||
{
|
||||
|
@ -12,23 +14,20 @@ class LoginTest extends TestCase
|
|||
{
|
||||
$response = $this->get('login');
|
||||
|
||||
$response->assertSuccessful()
|
||||
->assertSee('Forgot Your Password?');
|
||||
$response->assertSee('Forgot Your Password?');
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function view_register_page()
|
||||
{
|
||||
if(true === config('pixelfed.open_registration')) {
|
||||
if(true == config('pixelfed.open_registration')) {
|
||||
$response = $this->get('register');
|
||||
|
||||
$response->assertSuccessful()
|
||||
->assertSee('Register a new account');
|
||||
$response->assertSee('Register a new account');
|
||||
} else {
|
||||
$response = $this->get('register');
|
||||
|
||||
$response->assertSuccessful()
|
||||
->assertSee('Registration is closed');
|
||||
$response->assertSee('Registration is closed');
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue