mirror of
https://github.com/wallabag/wallabag.git
synced 2025-06-27 16:36:00 +00:00
Expect that user registration is always enabled in tests
This commit is contained in:
parent
163c3773cb
commit
738e95615a
4 changed files with 2 additions and 14 deletions
|
@ -1,3 +1,4 @@
|
|||
DATABASE_URL=sqlite:///%kernel.project_dir%/data/db/wallabag_test.sqlite?charset=utf8
|
||||
#DATABASE_URL=mysql://root:wallaroot@mariadb:3306/wallabag_test?charset=utf8mb4
|
||||
#DATABASE_URL=postgres://wallabag:wallapass@postgres:5432/wallabag_test?charset=utf8
|
||||
FOSUSER_REGISTRATION=true
|
||||
|
|
|
@ -3,7 +3,7 @@ imports:
|
|||
- { resource: services_test.yml }
|
||||
|
||||
parameters:
|
||||
fosuser_registration: true
|
||||
fosuser_registration: '%env(FOSUSER_REGISTRATION)%'
|
||||
database_url: '%env(resolve:DATABASE_URL)%'
|
||||
domain_name: '%env(DOMAIN_NAME)%'
|
||||
|
||||
|
|
|
@ -41,12 +41,6 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
|||
// create a new client instead of using $this->client to be sure client isn't authenticated
|
||||
$client = $this->createUnauthorizedClient();
|
||||
|
||||
if (!$client->getContainer()->getParameter('fosuser_registration')) {
|
||||
$this->markTestSkipped('fosuser_registration is not enabled.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$client->getContainer()->get(Config::class)->set('api_user_registration', 1);
|
||||
|
||||
$client->request('GET', '/api/info');
|
||||
|
|
|
@ -85,13 +85,6 @@ class SecurityControllerTest extends WallabagTestCase
|
|||
public function testEnabledRegistration()
|
||||
{
|
||||
$client = $this->getTestClient();
|
||||
|
||||
if (!$client->getContainer()->getParameter('fosuser_registration')) {
|
||||
$this->markTestSkipped('fosuser_registration is not enabled.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$client->followRedirects();
|
||||
$client->request('GET', '/register');
|
||||
$this->assertStringContainsString('registration.submit', $client->getResponse()->getContent());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue