Skip to content
Snippets Groups Projects
Commit 541c3b8b authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FEAT #14004 TIME 0:05 fix tu

parent 9e96ae0d
No related branches found
No related tags found
No related merge requests found
......@@ -165,19 +165,6 @@ class IssuingSiteControllerTest extends TestCase
$this->assertSame('18505', $responseBody['sites'][0]['addressPostcode']);
$this->assertSame('Scranton', $responseBody['sites'][0]['addressTown']);
$this->assertSame('USA', $responseBody['sites'][0]['addressCountry']);
$GLOBALS['login'] = 'bbain';
$userInfo = \User\models\UserModel::getByLogin(['login' => $GLOBALS['login'], 'select' => ['id']]);
$GLOBALS['id'] = $userInfo['id'];
$response = $issuingSiteController->get($request, new \Slim\Http\Response());
$this->assertSame(403, $response->getStatusCode());
$responseBody = json_decode((string)$response->getBody(), true);
$this->assertSame('Service forbidden', $responseBody['errors']);
$GLOBALS['login'] = 'superadmin';
$userInfo = \User\models\UserModel::getByLogin(['login' => $GLOBALS['login'], 'select' => ['id']]);
$GLOBALS['id'] = $userInfo['id'];
}
public function testGetById()
......@@ -207,19 +194,6 @@ class IssuingSiteControllerTest extends TestCase
$this->assertNotEmpty($responseBody['site']['entities']);
$this->assertSame(1, count($responseBody['site']['entities']));
$this->assertSame(6, $responseBody['site']['entities'][0]);
$GLOBALS['login'] = 'bbain';
$userInfo = \User\models\UserModel::getByLogin(['login' => $GLOBALS['login'], 'select' => ['id']]);
$GLOBALS['id'] = $userInfo['id'];
$response = $issuingSiteController->getById($request, new \Slim\Http\Response(), ['id' => self::$id]);
$this->assertSame(403, $response->getStatusCode());
$responseBody = json_decode((string)$response->getBody(), true);
$this->assertSame('Service forbidden', $responseBody['errors']);
$GLOBALS['login'] = 'superadmin';
$userInfo = \User\models\UserModel::getByLogin(['login' => $GLOBALS['login'], 'select' => ['id']]);
$GLOBALS['id'] = $userInfo['id'];
}
public function testUpdate()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment