cloudcreativity / laravel-json-api

JSON API (jsonapi.org) package for Laravel applications.
http://laravel-json-api.readthedocs.io/en/latest/
Apache License 2.0
778 stars 109 forks source link

Error in tests #641

Open Yeleup opened 9 months ago

Yeleup commented 9 months ago

if I do this the tests pass $id = $response ->assertCreatedWithServerId(null, $data) ->id();

but if I change the tests as in the documentation the tests do not work $id = $response ->assertCreatedWithServerId('http://localhost:8100/api/v1/items', $data) ->id();

tests do not work and an error is written image

lindyhopchris commented 6 months ago

Hi! There are multiple tests in this package that are doing the following:

$response->assertCreatedWithServerId(url('/api/v1/posts'), $data)

Which is exactly this scenario. All of them are passing.

Can you provide the full code of your test? Plus confirm that you aren't doing anything custom in the relevant controller for this resource?