Esempio n. 1
0
 public function testIndex()
 {
     $response = $this->callJSON('GET', '/api/v1/users');
     $this->assertResponseOk();
     $this->assertResponseJSONValid();
     $json = $this->getJSONContent();
     $this->assertJSONCollectionResponse('users');
     $this->assertJSONTypes('users[0]', $this->userJSONFormat);
     $this->assertEquals(0, $json->response->offset);
     $this->assertEquals(User::count(), $json->response->total);
 }