diff --git a/.env.testing b/.env.testing index 2e32deb40..77037af17 100644 --- a/.env.testing +++ b/.env.testing @@ -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 diff --git a/tests/Feature/InstalledTest.php b/tests/Feature/InstalledTest.php index c64567743..27b5f1535 100644 --- a/tests/Feature/InstalledTest.php +++ b/tests/Feature/InstalledTest.php @@ -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'], ], ]); diff --git a/tests/Feature/LoginTest.php b/tests/Feature/LoginTest.php index 4972c87cd..750c4889c 100644 --- a/tests/Feature/LoginTest.php +++ b/tests/Feature/LoginTest.php @@ -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'); } } } \ No newline at end of file