mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 09:22:22 +00:00
- Added codeception test cases
- Moved old libraries to CI
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
-- UPDATE tbl_studiengang
|
||||
UPDATE public.tbl_studiengang SET onlinebewerbung = TRUE;
|
||||
|
||||
-- EMPTY public.tbl_preinteressent
|
||||
DELETE FROM public.tbl_preinteressent;
|
||||
-- EMPTY public.tbl_prestudentstatus
|
||||
DELETE FROM public.tbl_prestudentstatus;
|
||||
-- EMPTY public.tbl_prestudent
|
||||
DELETE FROM public.tbl_prestudent;
|
||||
-- EMPTY lehre.tbl_studienplan
|
||||
DELETE FROM lehre.tbl_studienplan_semester;
|
||||
-- EMPTY lehre.tbl_studienplan
|
||||
@@ -179,6 +185,15 @@ INSERT INTO lehre.tbl_studienplan VALUES (2, 1, 'VZ', 'A', '01234', 6, 'English'
|
||||
INSERT INTO lehre.tbl_studienplan VALUES (3, 1, 'VZ', 'A', '01234', 6, 'English', 't', 15, 't', NOW(), 'codeception', NOW(), NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO lehre.tbl_studienplan VALUES (4, 1, 'VZ', 'A', '01234', 6, 'English', 't', 15, 't', NOW(), 'codeception', NOW(), NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
-- INSERT Prestudent (public.tbl_prestudent)
|
||||
INSERT INTO public.tbl_prestudent VALUES (1, 'TGM', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'f', NULL, 't', NULL, NULL, NULL, NULL, NULL, NULL, 'f', NULL, NULL, NULL, 0.0, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
-- INSERT Prestudent status (public.tbl_prestudentstatus)
|
||||
INSERT INTO public.tbl_prestudentstatus VALUES (1, 'Interessent', 'WS2016', 1, NOW(), NOW(), 'codeception', NOW(), 'codeception', NULL, 'VZ', 1, NULL, 'admin', NULL, NULL, NULL, NULL);
|
||||
|
||||
-- INSERT Preinteressent (public.tbl_preinteressent)
|
||||
INSERT INTO public.tbl_preinteressent VALUES (1, 1, 'WS2016', 'TGM', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'bewerbungonline', NULL);
|
||||
|
||||
-- INSERT INTO lehre.tbl_studienplan_semester (studienplan_semester_id, studienplan_id, studiensemester_kurzbz, semester)
|
||||
INSERT INTO lehre.tbl_studienplan_semester VALUES (1, 1, 'WS2016', 1);
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/codex/bundesland/All');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
$I->sendGET('v1/codex/bundesland/All');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/content/dms/dms');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
$I->sendGET('v1/content/dms/Dms', array('dms_id' => 1));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/person/kontakt/kontakt');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
$I->sendGET('v1/person/kontakt/kontakt', array('person_id' => 1));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/codex/orgform Orgform and All');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
$I->sendGET('v1/codex/orgform/Orgform', array('orgform_kurzbz' => 'VZ'));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/codex/orgform/All');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/crm/preinteressent Preinteressent and PreinteressentByPersonID');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
$I->sendGET('v1/crm/preinteressent/Preinteressent', array('preinteressent_id' => 1));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/crm/preinteressent/PreinteressentByPersonID', array('person_id' => 1));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/crm/prestudent Prestudent and PrestudentByPersonID');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
$I->sendGET('v1/crm/prestudent/Prestudent', array('prestudent_id' => 1));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/crm/prestudent/PrestudentByPersonID', array('person_id' => 1));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
@@ -5,7 +5,7 @@ $I->wantTo('Test API call v1/organisation/studiengang Studiengang and AllForBewe
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
$I->sendGET('v1/organisation/studiengang/Studiengang');
|
||||
$I->sendGET('v1/organisation/studiengang/Studiengang', array('studiengang_kz' => 1));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/organisation/studiensemester studiensemester and nextStudiensemester');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
$I->sendGET('v1/organisation/studiensemester/Studiensemester', array('studiensemester_kurzbz' => 'WS2016'));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studiensemester/NextStudiensemester');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studiensemester/NextStudiensemester', array('art' => 'WS'));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
Reference in New Issue
Block a user