force no wrapping on the user fleet list #35
This commit is contained in:
@@ -74,6 +74,7 @@ class UserController extends RestController
|
|||||||
$user = $this->userRepo->find($id);
|
$user = $this->userRepo->find($id);
|
||||||
$subfleets = $this->userSvc->getAllowableSubfleets($user);
|
$subfleets = $this->userSvc->getAllowableSubfleets($user);
|
||||||
|
|
||||||
|
SubfleetResource::withoutWrapping();
|
||||||
return SubfleetResource::collection($subfleets);
|
return SubfleetResource::collection($subfleets);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -42,8 +42,7 @@ class PilotTest extends TestCase
|
|||||||
$body = $resp->json();
|
$body = $resp->json();
|
||||||
|
|
||||||
# Get the subfleet that's been added in
|
# Get the subfleet that's been added in
|
||||||
print_r($body);
|
$subfleet_from_api = $body[0];
|
||||||
$subfleet_from_api = $body['data'][0];
|
|
||||||
$this->assertEquals($subfleet->id, $subfleet_from_api['id']);
|
$this->assertEquals($subfleet->id, $subfleet_from_api['id']);
|
||||||
|
|
||||||
# Get all the aircraft from that subfleet
|
# Get all the aircraft from that subfleet
|
||||||
@@ -57,7 +56,7 @@ class PilotTest extends TestCase
|
|||||||
$body = $resp->json();
|
$body = $resp->json();
|
||||||
|
|
||||||
# Get the subfleet that's been added in
|
# 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']);
|
$this->assertEquals($subfleet->id, $subfleet_from_api['id']);
|
||||||
|
|
||||||
# Get all the aircraft from that subfleet
|
# Get all the aircraft from that subfleet
|
||||||
|
|||||||
Reference in New Issue
Block a user