public function boot(APITester $I) { $I->amHttpAuthenticated('admin', 'testpassword'); $I->sendGET('/login'); $I->seeResponseCodeIs(201); $json = $I->grabResponse(); $this->token = json_decode($json)->token; }
public function checkLogin(APITester $I) { $I->amHttpAuthenticated('admin', 'testpassword'); $I->sendGET('/login'); $I->seeResponseCodeIs(201); $I->seeResponseIsJson(); $I->seeResponseContainsJson(['status' => 'ok']); }