-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature testing with ->get or ->json doesn't pass include string to Manager #42
Comments
Possible duplicate of #31 and https://github.com/ellipsesynergie/api-response#testing-within-laravel |
Yeah, seems to be duplicate. |
However, I am not having much luck with the Trait I get: Digging into the 5.4.35 Illuminate\Foundation\Testing\Concerns\MakesHttpRequests::call I see it may have changed from what the Trait does. Tried putting this into TestCase:
But getting: Stuck a bit here |
I see what I did Final call() `public function call($method, $uri, $parameters = [], $cookies = [], $files = [], $server = [], $content = null)
Actually have no idea how this works since $response gets reset ... |
Steps to reproduce
$json = $this->actingAs($user, 'customer') ->json('GET','v2/customer', ['include'=>'cart']) ->assertJson([ 'data' => [ 'cart' => [ 'data' => [] ] ], ]);
Expected behaviour
Response should assert the 'cart' include, which works if I hit it with postman for example.
Actual behaviour
None of the includes, except the defaults are included
The text was updated successfully, but these errors were encountered: