From fd826ae1fe855102095a0adf56e837a49a05372f Mon Sep 17 00:00:00 2001 From: paolo Date: Wed, 27 Jul 2016 19:09:42 +0200 Subject: [PATCH] Extended codeception tests --- tests/codeception/tests/api/v1/MessageCept.php | 10 ++++++++++ .../codeception/tests/api/v1/PrestudentstatusCept.php | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/tests/codeception/tests/api/v1/MessageCept.php b/tests/codeception/tests/api/v1/MessageCept.php index 6a4146a29..64b129687 100644 --- a/tests/codeception/tests/api/v1/MessageCept.php +++ b/tests/codeception/tests/api/v1/MessageCept.php @@ -8,4 +8,14 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); $I->sendGET("v1/system/message/MessagesByPersonID", array("person_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); + +$I->sendGET("v1/system/message/MessagesByUID", array("uid" => "mckenzie")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); + +$I->sendGET("v1/system/message/MessagesByToken", array("token" => "token")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/PrestudentstatusCept.php b/tests/codeception/tests/api/v1/PrestudentstatusCept.php index c74f30aea..2c31f76e6 100644 --- a/tests/codeception/tests/api/v1/PrestudentstatusCept.php +++ b/tests/codeception/tests/api/v1/PrestudentstatusCept.php @@ -8,4 +8,9 @@ $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); $I->sendGET("v1/crm/Prestudentstatus/Prestudentstatus", array("ausbildungssemester" => "0", "studiensemester_kurzbz" => "0", "status_kurzbz" => "0", "prestudent_id" => "0")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); + +$I->sendGET("v1/crm/Prestudentstatus/LastStatus", array("prestudent_id" => 3)); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); \ No newline at end of file