Merge origin/ci into ci

Conflicts:
	application/config/config.php
	tests/codeception/_data/dump.sql
	tests/codeception/api/v1/PersonCept.php
This commit is contained in:
paolo
2016-04-27 11:54:20 +02:00
parent 51774021b4
commit 549b0133c2
8 changed files with 577 additions and 134 deletions
+14 -7
View File
@@ -1,26 +1,33 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('Test API call v1/person/person/Person');
$I->wantTo('test the Person id');
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('v1/person/person/Person', array('person_id' => 3));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson([
'success' => TRUE,
'message' => 'Person found']);
'person_id' => '3',
'nachname' => 'McKenzie']);
$I->sendGET('v1/person/person/Person', array('code' => '01234567A'));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson([
'success' => TRUE,
'message' => 'Person found']);
'person_id' => '4',
'nachname' => 'Wilderman']);
$I->sendGET('v1/person/person/Person', array('code' => '01234567A', 'email' => 'mckenzie.vicenta@calva.dev'));
$I->wantTo('test the Person not found');
$I->sendGET('v1/person/person/Person', array('code' => '12345'));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson([
'success' => false,
'message' => 'Person not found']);
/*$I->sendGET('v1/person/person/Person', array('code' => 'bd94ef5d5a', 'email' => '12351235'));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson([
'success' => TRUE,
'message' => 'Person found']);