actions gitea and github + more tests
This commit is contained in:
@@ -41,8 +41,7 @@ class CitiesControllerTest extends BaseControllerTest
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->Cities = $this->getTableLocator()->get('Cities');
|
||||
$this->enableCsrfToken();
|
||||
$this->Cities = $this->getTableLocator()->get('CakeAddresses.Cities');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,28 +56,6 @@ class CitiesControllerTest extends BaseControllerTest
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test select method
|
||||
*
|
||||
* Tests the select action with an unauthenticated user (not logged in)
|
||||
*
|
||||
* @uses \CakeAddresses\Controller\CitiesController::select()
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testSelectGetUnauthenticated(): void
|
||||
{
|
||||
$url = [
|
||||
'plugin' => 'CakeAddresses',
|
||||
'controller' => 'Cities',
|
||||
'action' => 'select',
|
||||
];
|
||||
$this->get($url);
|
||||
$this->assertResponseCode(302);
|
||||
$this->assertRedirectContains('login');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test select method
|
||||
*
|
||||
@@ -89,9 +66,8 @@ class CitiesControllerTest extends BaseControllerTest
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testSelectGetLoggedIn(): void
|
||||
public function testSelect(): void
|
||||
{
|
||||
$this->loginUserByRole();
|
||||
$url = [
|
||||
'plugin' => 'CakeAddresses',
|
||||
'controller' => 'Cities',
|
||||
|
||||
Reference in New Issue
Block a user