force no wrapping on the user fleet list #35

This commit is contained in:
Nabeel Shahzad
2018-01-10 19:00:38 -06:00
parent 396f4ac966
commit 4f4137abf2
2 changed files with 3 additions and 3 deletions

View File

@@ -74,6 +74,7 @@ class UserController extends RestController
$user = $this->userRepo->find($id);
$subfleets = $this->userSvc->getAllowableSubfleets($user);
SubfleetResource::withoutWrapping();
return SubfleetResource::collection($subfleets);
}

View File

@@ -42,8 +42,7 @@ class PilotTest extends TestCase
$body = $resp->json();
# Get the subfleet that's been added in
print_r($body);
$subfleet_from_api = $body['data'][0];
$subfleet_from_api = $body[0];
$this->assertEquals($subfleet->id, $subfleet_from_api['id']);
# Get all the aircraft from that subfleet
@@ -57,7 +56,7 @@ class PilotTest extends TestCase
$body = $resp->json();
# Get the subfleet that's been added in
$subfleet_from_api = $body['data'][0];
$subfleet_from_api = $body[0];
$this->assertEquals($subfleet->id, $subfleet_from_api['id']);
# Get all the aircraft from that subfleet