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

tests/krate/publish: Use assert_eq!() to check response payload content #3066

Merged
merged 5 commits into from
Dec 13, 2020

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Dec 3, 2020

Using the json!() macro makes it quite straight forward to assert against the exact response payload expectation and is ultimately less verbose than checking against json.errors[0].detail like we currently do.

r? @jtgeibel

@jtgeibel
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Dec 13, 2020

📌 Commit 191e1e5 has been approved by jtgeibel

@bors
Copy link
Contributor

bors commented Dec 13, 2020

⌛ Testing commit 191e1e5 with merge bbe06e2...

@bors
Copy link
Contributor

bors commented Dec 13, 2020

☀️ Test successful - checks-actions
Approved by: jtgeibel
Pushing bbe06e2 to master...

@bors bors merged commit bbe06e2 into rust-lang:master Dec 13, 2020
@Turbo87 Turbo87 deleted the errors branch December 14, 2020 01:06
bors added a commit that referenced this pull request Dec 22, 2020
tests: Use `assert_eq!()` to check error response payload content

This PR continues #3066 and converts the remaining tests to use the same pattern of using `assert_eq!()` and the `json!()` macro to assert on the exact structure and content of the error responses.

r? `@jtgeibel`
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.

4 participants