diff options
Diffstat (limited to 'tests/Wallabag')
-rw-r--r-- | tests/Wallabag/CoreBundle/Controller/SiteCredentialControllerTest.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/SiteCredentialControllerTest.php b/tests/Wallabag/CoreBundle/Controller/SiteCredentialControllerTest.php index 87ea2867..f5074403 100644 --- a/tests/Wallabag/CoreBundle/Controller/SiteCredentialControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/SiteCredentialControllerTest.php | |||
@@ -8,6 +8,20 @@ use Wallabag\CoreBundle\Entity\SiteCredential; | |||
8 | 8 | ||
9 | class SiteCredentialControllerTest extends WallabagCoreTestCase | 9 | class SiteCredentialControllerTest extends WallabagCoreTestCase |
10 | { | 10 | { |
11 | public function testAccessDeniedBecauseFeatureDisabled() | ||
12 | { | ||
13 | $this->logInAs('admin'); | ||
14 | $client = $this->getClient(); | ||
15 | |||
16 | $client->getContainer()->get('craue_config')->set('restricted_access', 0); | ||
17 | |||
18 | $client->request('GET', '/site-credentials/'); | ||
19 | |||
20 | $this->assertSame(404, $client->getResponse()->getStatusCode()); | ||
21 | |||
22 | $client->getContainer()->get('craue_config')->set('restricted_access', 1); | ||
23 | } | ||
24 | |||
11 | public function testListSiteCredential() | 25 | public function testListSiteCredential() |
12 | { | 26 | { |
13 | $this->logInAs('admin'); | 27 | $this->logInAs('admin'); |