diff --git a/application/controllers/api/v1/education/Uebung.php b/application/controllers/api/v1/education/Uebung.php index 9c1b901c2..8cb394cf2 100644 --- a/application/controllers/api/v1/education/Uebung.php +++ b/application/controllers/api/v1/education/Uebung.php @@ -23,7 +23,7 @@ class Uebung extends APIv1_Controller { parent::__construct(); // Load model UebungModel - $this->load->model('Education/uebung_model', 'UebungModel'); + $this->load->model('education/uebung_model', 'UebungModel'); } /** diff --git a/application/controllers/api/v1/system/Thread.php b/application/controllers/api/v1/system/Thread.php deleted file mode 100644 index ab885dcd7..000000000 --- a/application/controllers/api/v1/system/Thread.php +++ /dev/null @@ -1,76 +0,0 @@ -load->model('system/Thread_model', 'ThreadModel'); - } - - /** - * @return void - */ - public function getThread() - { - $threadID = $this->get('thread_id'); - - if (isset($threadID)) - { - $result = $this->ThreadModel->load($threadID); - - $this->response($result, REST_Controller::HTTP_OK); - } - else - { - $this->response(); - } - } - - /** - * @return void - */ - public function postThread() - { - if ($this->_validate($this->post())) - { - if (isset($this->post()['thread_id'])) - { - $result = $this->ThreadModel->update($this->post()['thread_id'], $this->post()); - } - else - { - $result = $this->ThreadModel->insert($this->post()); - } - - $this->response($result, REST_Controller::HTTP_OK); - } - else - { - $this->response(); - } - } - - private function _validate($thread = NULL) - { - return true; - } -} \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/CheckUserAuthCept.php b/tests/codeception/tests/api/v1/CheckUserAuthCept.php new file mode 100644 index 000000000..83eb21c9b --- /dev/null +++ b/tests/codeception/tests/api/v1/CheckUserAuthCept.php @@ -0,0 +1,12 @@ +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->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/LeNotenschluesselCept.php b/tests/codeception/tests/api/v1/LenotenschluesselCept.php similarity index 100% rename from tests/codeception/tests/api/v1/LeNotenschluesselCept.php rename to tests/codeception/tests/api/v1/LenotenschluesselCept.php diff --git a/tests/codeception/tests/api/v1/LePruefungCept.php b/tests/codeception/tests/api/v1/LepruefungCept.php similarity index 100% rename from tests/codeception/tests/api/v1/LePruefungCept.php rename to tests/codeception/tests/api/v1/LepruefungCept.php diff --git a/tests/codeception/tests/api/v1/OrganisationseinheitCept.php b/tests/codeception/tests/api/v1/Organisationseinheit2Cept.php similarity index 100% rename from tests/codeception/tests/api/v1/OrganisationseinheitCept.php rename to tests/codeception/tests/api/v1/Organisationseinheit2Cept.php diff --git a/tests/codeception/tests/api/v1/Thread.php b/tests/codeception/tests/api/v1/RtPersonCept.php similarity index 67% rename from tests/codeception/tests/api/v1/Thread.php rename to tests/codeception/tests/api/v1/RtPersonCept.php index 88d8eef24..356be6c25 100644 --- a/tests/codeception/tests/api/v1/Thread.php +++ b/tests/codeception/tests/api/v1/RtPersonCept.php @@ -1,11 +1,11 @@ wantTo("Test API call v1/system/thread/Thread"); +$I->wantTo("Test API call v1/crm/RtPerson/RtPerson"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); -$I->sendGET("v1/system/thread/Thread", array("thread_id" => "0")); +$I->sendGET("v1/crm/RtPerson/RtPerson", array("rt_person_id" => "0")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); diff --git a/tests/codeception/tests/api/v1/SpracheCept.php b/tests/codeception/tests/api/v1/Sprache2Cept.php similarity index 100% rename from tests/codeception/tests/api/v1/SpracheCept.php rename to tests/codeception/tests/api/v1/Sprache2Cept.php diff --git a/tests/codeception/tests/api/v1/StatusgrundCept.php b/tests/codeception/tests/api/v1/StatusgrundCept.php new file mode 100644 index 000000000..34afdd47e --- /dev/null +++ b/tests/codeception/tests/api/v1/StatusgrundCept.php @@ -0,0 +1,12 @@ +wantTo("Test API call v1/crm/Statusgrund/Statusgrund"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); + +$I->sendGET("v1/crm/Statusgrund/Statusgrund", array("statusgrund_kurzbz" => "0")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/StudiengangCept.php b/tests/codeception/tests/api/v1/Studiengang2Cept.php similarity index 100% rename from tests/codeception/tests/api/v1/StudiengangCept.php rename to tests/codeception/tests/api/v1/Studiengang2Cept.php diff --git a/tests/codeception/tests/api/v1/TestCept.php b/tests/codeception/tests/api/v1/TestCept.php new file mode 100644 index 000000000..c4c54a7fd --- /dev/null +++ b/tests/codeception/tests/api/v1/TestCept.php @@ -0,0 +1,12 @@ +wantTo("Test API call v1/Test/test"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); + +$I->sendGET("v1/Test/test"); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["success" => true]); +$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/Uebung.php b/tests/codeception/tests/api/v1/UebungCept.php similarity index 100% rename from tests/codeception/tests/api/v1/Uebung.php rename to tests/codeception/tests/api/v1/UebungCept.php