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

[5.4] Add context to the assert json test response method #18166

Merged
merged 1 commit into from
Mar 1, 2017

Conversation

nathan-isaac
Copy link

@nathan-isaac nathan-isaac commented Feb 28, 2017

The issue with the current assertJson method is that it only gives the expected value in the test failure output.

Any thoughts on this new output?

New test failure output:

Unable to find JSON subset:

{
     'message' => 'Successfully updated post.'
}

within

{
    "title": [
        "The title field is required."
    ]
}.


Failed asserting that an array has the subset Array &0 (
    'message' => 'Successfully updated post.'
).

Current test failure output:

Failed asserting that an array has the subset Array &0 (
    'message' => 'Successfully updated post.'
).

@taylorotwell taylorotwell merged commit 7b9f35b into laravel:5.4 Mar 1, 2017
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

Successfully merging this pull request may close these issues.

2 participants