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

$response->assertSessionHasErrors('dob'); Gives following Error : Session is missing expected key [errors]. #3

Open
ghost opened this issue Jan 3, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 3, 2020

Thanks for the great tutorial. I was trying to follow this tutorial but i am getting some error while running validation tests. I am using Laravel version 6.9.0.

The error is getting following:

Session is missing expected key [errors]..

Thanks in advance.

@ghost
Copy link
Author

ghost commented Jan 3, 2020

I think i have found the solution here. https://stackoverflow.com/questions/57036898/laravel-5-8-nova-login-test-session-is-missing-expected-key-errors . You should use assertJsonValidationErrors instead assertSessionHasErrors.

And i believe that is because i am using api routes.

@shabayekdes
Copy link

I upgrade the project to version 7 and the test was passed
I agree with you that the problem because you using api routes
thanks for you

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

1 participant