Добавлена поддержка авторизации с передачей параметров в теле запроса + тесты под этот кейс

This commit is contained in:
ErickSkrauch
2016-10-15 16:07:03 +03:00
parent 27d2b52ff5
commit bafac25baf
2 changed files with 15 additions and 4 deletions

View File

@ -38,6 +38,17 @@ class AuthorizationCest {
$this->testSuccessResponse($I);
}
public function byEmailWithParamsAsJsonInPostBody(FunctionalTester $I) {
$I->wantTo('authenticate by email and password, passing values as serialized string in post body');
$this->route->authenticate(json_encode([
'username' => 'admin@ely.by',
'password' => 'password_0',
'clientToken' => Uuid::uuid4()->toString(),
]));
$this->testSuccessResponse($I);
}
public function wrongArguments(FunctionalTester $I) {
$I->wantTo('get error on wrong amount of arguments');
$this->route->authenticate([