- DB_Model added new functionalities

- Codeception changed
 - Studiengang_model fixed message error
 - Removed File and File_model, they will be replaced by Dms and Dms_model
 - Added new permissions in fhcomplete config file
This commit is contained in:
paolo
2016-05-09 18:19:58 +02:00
parent 28e1707b4e
commit 6d093dc4ed
11 changed files with 52 additions and 126 deletions
@@ -1,12 +0,0 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('Test API call v1/lehre/studiengang/AllForBewerbung');
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('v1/lehre/studiengang/AllForBewerbung');
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson([
'success' => TRUE,
'message' => 'Courses found']);
+3 -12
View File
@@ -1,19 +1,10 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('Test API call v1/nation All and FederalState');
$I->wantTo('Test API call v1/codex/nation All and FederalState');
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('v1/nation/All');
$I->sendGET('v1/codex/nation/All');
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson([
'success' => TRUE,
'message' => 'Nation found']);
$I->sendGET('v1/nation/Bundesland');
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson([
'success' => TRUE,
'message' => 'Bundesland found']);
$I->seeResponseContainsJson(['error' => 0]);
@@ -25,8 +25,8 @@ $I->sendGET('v1/person/person/Person', array('code' => '12345'));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson([
'success' => false,
'message' => 'Person not found']);
'error' => 0,
'retval' => array()]);
$I->sendGET('v1/person/person/Person', array('code' => '01234567C', 'email' => 'harvey.joshuah@calva.dev'));
$I->seeResponseCodeIs(200);
@@ -1,12 +0,0 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('Test API call v1/lehre/studienplan/Studienplaene');
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('v1/lehre/studienplan/Studienplaene', array('studiengang_kz' => 1));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson([
'success' => TRUE,
'message' => 'Plan found']);
@@ -0,0 +1,10 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('Test API call v1/organisation/studiengang/AllForBewerbung');
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('v1/organisation/studiengang/AllForBewerbung');
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);
@@ -0,0 +1,10 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('Test API call v1/organisation/studienplan/Studienplaene');
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('v1/organisation/studienplan/Studienplaene', array('studiengang_kz' => 1));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);