public function checkLogin(APITester $I) { $I->amHttpAuthenticated('admin', 'testpassword'); $I->sendGET('/login'); $I->seeResponseCodeIs(201); $I->seeResponseIsJson(); $I->seeResponseContainsJson(['status' => 'ok']); }
function createAUserWithMissingEmail(APITester $I) { $I->wantTo('See an error message when missing an email'); $I->haveHttpHeader('Content-Type', 'application/x-www-form-urlencoded'); $I->sendPOST('users', ['username' => 'username', 'password' => 'password', 'password_conf' => 'password']); $I->seeResponseCodeIs(400); $I->seeResponseIsJson(); $I->seeResponseContainsJson(['status' => 'fail']); }
public function getOnePage(APITester $I) { $I->sendGET('/pages/home'); $I->seeResponseCodeIs(200); $I->seeResponseContainsJson(['slug' => 'home']); }