Commit 9f8d19ff authored by Nicolas Widart's avatar Nicolas Widart

Adding more tests for the roles

parent 6299fa27
......@@ -35,4 +35,48 @@ class UrlTest extends \TestCase
$this->assertCount(1, $crawler->filter('h1:contains("Edit User")'));
}
/** @test */
public function userCreateShouldBeAccessible()
{
$uri = '/' . Config::get('core::core.admin-prefix') . '/users/create';
$crawler = $this->client->request('GET', $uri);
$this->assertTrue($this->client->getResponse()->isOk());
$this->assertCount(1, $crawler->filter('h1:contains("New User")'));
}
/** @test */
public function roleIndexShouldBeAccessible()
{
$uri = '/' . Config::get('core::core.admin-prefix') . '/roles';
$crawler = $this->client->request('GET', $uri);
$this->assertTrue($this->client->getResponse()->isOk());
$this->assertCount(1, $crawler->filter('h1:contains("Roles")'));
}
/** @test */
public function roleCreateShouldBeAccessible()
{
$uri = '/' . Config::get('core::core.admin-prefix') . '/roles/create';
$crawler = $this->client->request('GET', $uri);
$this->assertTrue($this->client->getResponse()->isOk());
$this->assertCount(1, $crawler->filter('h1:contains("New Role")'));
}
/** @test */
public function roleEditShouldBeAccessible()
{
$uri = '/' . Config::get('core::core.admin-prefix') . '/roles/6/edit';
$crawler = $this->client->request('GET', $uri);
$this->assertTrue($this->client->getResponse()->isOk());
$this->assertCount(1, $crawler->filter('h1:contains("Updating Role")'));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment