diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-02 13:21:45 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-02 13:29:57 +0200 |
commit | ccc7faec094387681a59faa5ca79a86e33f06972 (patch) | |
tree | 138e9658b90da8f97dd75f70d9d719ddcbfb5719 /tests/Wallabag/UserBundle/Controller | |
parent | eb4142e0afa5c83c9e301e38e57a72322be05e8c (diff) | |
download | wallabag-ccc7faec094387681a59faa5ca79a86e33f06972.tar.gz wallabag-ccc7faec094387681a59faa5ca79a86e33f06972.tar.zst wallabag-ccc7faec094387681a59faa5ca79a86e33f06972.zip |
Disabled delete button for the logged user
To avoid some bad things to happen…
Diffstat (limited to 'tests/Wallabag/UserBundle/Controller')
-rw-r--r-- | tests/Wallabag/UserBundle/Controller/ManageControllerTest.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/Wallabag/UserBundle/Controller/ManageControllerTest.php b/tests/Wallabag/UserBundle/Controller/ManageControllerTest.php index 247eb6ba..19b824b8 100644 --- a/tests/Wallabag/UserBundle/Controller/ManageControllerTest.php +++ b/tests/Wallabag/UserBundle/Controller/ManageControllerTest.php | |||
@@ -68,4 +68,15 @@ class ManageControllerTest extends WallabagCoreTestCase | |||
68 | // Check the user has been delete on the list | 68 | // Check the user has been delete on the list |
69 | $this->assertNotRegExp('/Foo User/', $client->getResponse()->getContent()); | 69 | $this->assertNotRegExp('/Foo User/', $client->getResponse()->getContent()); |
70 | } | 70 | } |
71 | |||
72 | public function testDeleteDisabledForLoggedUser() | ||
73 | { | ||
74 | $this->logInAs('admin'); | ||
75 | $client = $this->getClient(); | ||
76 | |||
77 | $crawler = $client->request('GET', '/users/'.$this->getLoggedInUserId().'/edit'); | ||
78 | $disabled = $crawler->selectButton('user.form.delete')->extract('disabled'); | ||
79 | |||
80 | $this->assertEquals('disabled', $disabled[0]); | ||
81 | } | ||
71 | } | 82 | } |