1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Merge pull request #2186 from wallabag/addRegistration

Add option to disable registration
This commit is contained in:
Jeremy Benoist 2016-08-24 11:13:00 +02:00 committed by GitHub
commit a1ab7d1d32
9 changed files with 71 additions and 2 deletions

View file

@ -33,7 +33,7 @@ class InstallCommandTest extends WallabagCoreTestCase
}
/**
* Ensure next tests will have a clean database
* Ensure next tests will have a clean database.
*/
public static function tearDownAfterClass()
{

View file

@ -69,4 +69,19 @@ class SecurityControllerTest extends WallabagCoreTestCase
$this->assertTrue($user->isTrustedComputer('ABCDEF'));
$this->assertFalse($user->isTrustedComputer('FEDCBA'));
}
public function testEnabledRegistration()
{
$client = $this->getClient();
if (!$client->getContainer()->getParameter('fosuser_registration')) {
$this->markTestSkipped('fosuser_registration is not enabled.');
return;
}
$client->followRedirects();
$crawler = $client->request('GET', '/register');
$this->assertContains('registration.submit', $crawler->filter('body')->extract(['_text'])[0]);
}
}