Skip to content
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

Not a valid Inertia response #427

Closed
ibrahim-999 opened this issue Jul 5, 2022 · 2 comments
Closed

Not a valid Inertia response #427

ibrahim-999 opened this issue Jul 5, 2022 · 2 comments

Comments

@ibrahim-999
Copy link

ibrahim-999 commented Jul 5, 2022

First : thank you so much for InertiaJs, it's awesome ! slightly_smiling_face

i use
inertiajs/inertia-laravel 0.6.3
Laravel 8.40

i got this respones every time i run my test and i have checked everything,

sometime i use Assert insted of AssertableInertia

if someone could point me on the right direction i would be glad

use Inertia\Testing\AssertableInertia;

use RefreshDatabase;

public function test_home_page_sponsors(): void
    {
        $sponsors = Sponsor::factory()->count(5)->create();

        $this->get('/')
            ->assertInertia(fn (AssertableInertia $page) => $page
            ->component('HomePage')
            ->has('sponsors.data', 5)
            ->has(
                'sponsors.data.0',
                fn (AssertableInertia $page) => $page
                    ->where('title', $sponsors[0]->title)
                    ->etc()
            ));
    } 
@amadeann
Copy link

It's related to this change:
#338

@jessarcher
Copy link
Member

Hey there,

We're closing this issue because it's inactive, already solved, old or not relevant anymore. Feel to open up a new issue if you're still experiencing this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants