From 2a58606983bd6091866a9f38149a87c25900decd Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 21 Jan 2016 12:24:35 +0100 Subject: Fix tests --- src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Wallabag/CoreBundle/Tests') diff --git a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php index 7d75e2b7..a79d7b90 100644 --- a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php +++ b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php @@ -81,6 +81,7 @@ class InstallCommandTest extends WallabagCoreTestCase $this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay()); $this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay()); + $this->assertContains('Droping database, creating database and schema, clearing the cache', $tester->getDisplay()); $this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay()); $this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay()); -- cgit v1.2.3 From 07c9b1c98a104a88f6bd0c97b54a8783444a2ac4 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 22 Jan 2016 18:48:04 +0100 Subject: Fix permission to settings page --- .../Tests/Controller/SettingsControllerTest.php | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/Wallabag/CoreBundle/Tests/Controller/SettingsControllerTest.php (limited to 'src/Wallabag/CoreBundle/Tests') diff --git a/src/Wallabag/CoreBundle/Tests/Controller/SettingsControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/SettingsControllerTest.php new file mode 100644 index 00000000..354aedba --- /dev/null +++ b/src/Wallabag/CoreBundle/Tests/Controller/SettingsControllerTest.php @@ -0,0 +1,32 @@ +logInAs('admin'); + $client = $this->getClient(); + + $crawler = $client->request('GET', '/settings'); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + } + + public function testSettingsWithNormalUser() + { + $this->logInAs('bob'); + $client = $this->getClient(); + + $crawler = $client->request('GET', '/settings'); + + $this->assertEquals(403, $client->getResponse()->getStatusCode()); + } +} -- cgit v1.2.3