get('/'); $res->assertResponseOk(); $res->assertStringContainsString( 'organization', $this->response->getContent() ); } public function test_backend_is_not_reachable_for_guests_and_redirect_to_login() { $home = $this->get('/'); $res = $this->get('/backend'); $res->assertResponseStatus(302); $res->assertEquals( $home->response->getContent(), $this->response->getContent() ); } public function test_backend_is_reachable_for_logged_in_users() { $res = $this->post('/backend', array( 'organization' => 'GruppoCO', 'password' => config('app.app_password') )); $res->assertResponseOk(); $res->assertStringContainsString( __('File exporter'), $this->response->getContent() ); } public function test_export_endpoint_is_not_reachable_for_guests_and_redirect_to_login() { $home = $this->get('/'); $res = $this->get('/export'); $res->assertResponseStatus(302); $res->assertEquals( $home->response->getContent(), $this->response->getContent() ); } }