mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-22 17:18:37 +00:00
Disabled delete button for the logged user
To avoid some bad things to happen…
This commit is contained in:
parent
eb4142e0af
commit
ccc7faec09
2 changed files with 12 additions and 1 deletions
|
@ -68,4 +68,15 @@ class ManageControllerTest extends WallabagCoreTestCase
|
|||
// Check the user has been delete on the list
|
||||
$this->assertNotRegExp('/Foo User/', $client->getResponse()->getContent());
|
||||
}
|
||||
|
||||
public function testDeleteDisabledForLoggedUser()
|
||||
{
|
||||
$this->logInAs('admin');
|
||||
$client = $this->getClient();
|
||||
|
||||
$crawler = $client->request('GET', '/users/'.$this->getLoggedInUserId().'/edit');
|
||||
$disabled = $crawler->selectButton('user.form.delete')->extract('disabled');
|
||||
|
||||
$this->assertEquals('disabled', $disabled[0]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue