aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag
diff options
context:
space:
mode:
authorJérémy Benoist <j0k3r@users.noreply.github.com>2017-11-22 15:11:25 +0100
committerGitHub <noreply@github.com>2017-11-22 15:11:25 +0100
commitf818f64145fa929c399277b665a84a87f31bbacd (patch)
tree6f0d8fad8c3e59237afb40cd8a4a272705006357 /tests/Wallabag
parentd3d0defabc8224172b59c85db66c2d4e6bc3f06b (diff)
parentef2b4041fb3791554e93b4180777adbfdcf9afa2 (diff)
downloadwallabag-f818f64145fa929c399277b665a84a87f31bbacd.tar.gz
wallabag-f818f64145fa929c399277b665a84a87f31bbacd.tar.zst
wallabag-f818f64145fa929c399277b665a84a87f31bbacd.zip
Merge pull request #3431 from wallabag/disable-site-credentials
Disable controller access if feature disabled
Diffstat (limited to 'tests/Wallabag')
-rw-r--r--tests/Wallabag/CoreBundle/Controller/SiteCredentialControllerTest.php14
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
9class SiteCredentialControllerTest extends WallabagCoreTestCase 9class 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');