Closed lucabecchetti closed 3 years ago
I have a test package like this, but it seems that testing not working:
public function test_authorized_user_can_access_resource(): void { $user = factory(User::class)->create(); $user->assignRole('admin'); $response = $this->actingAs($user)->get(Manager::createUri('pages')); $response->assertStatus(200); $response->assertInertia('resources/ResourceIndex'); }
The error:
BadMethodCallException : Method Illuminate\Http\Response::assertInertia does not exist.
Just need to add this:
protected function getPackageProviders($app) { return [ .... InertiaTestingServiceProvider::class .... ]; }
I have a test package like this, but it seems that testing not working:
The error:
BadMethodCallException : Method Illuminate\Http\Response::assertInertia does not exist.