mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
- Fixed codeception test
- Updated the api test suite - Added the script generate.php to automatically generate the test cases for the controllers
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo("Test API call v1/CheckUserAuth/CheckByUsernamePassword");
|
||||
$I->wantTo("Test API call v1/CheckUserAuth/: CheckByUsernamePassword");
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
|
||||
|
||||
$I->sendGET("v1/CheckUserAuth/CheckByUsernamePassword", array("username" => "admin", "password" => "1q2w3"));
|
||||
$I->sendGET("v1/CheckUserAuth/CheckByUsernamePassword", array("username" => "1", "password" => "1"));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(["error" => 0]);
|
||||
$I->wait();
|
||||
$I->wait();
|
||||
|
||||
Reference in New Issue
Block a user