Opened 8 years ago
Closed 8 years ago
#39399 closed enhancement (fixed)
REST API: Tests for the view or embed response data for the Users Controller are incomplete
Reported by: | rachelbaker | Owned by: | rachelbaker |
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | REST API | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
In
WP_Test_REST_Users_Controller->check_user_data()
tests for responses without acontext = edit
are missing assertions for the following:
- 'email` is not an array key
- 'registered_date' is not an array key (fix the incorrect
registered
key that is tested) - 'locale' is not an array key (See #38528)
Attachments (2)
Change History (8)
#1
@
8 years ago
- Keywords has-patch added; needs-patch removed
I've submitted a patch that I think addresses the issue as described in the ticket. This is my first patch, so please let me know if there's anything else that I should do / something that I should've done instead of what I did!
#2
@
8 years ago
Thanks for the patch, @thepelkus! The changes look correct to me, but the patch file itself is reversed (click on 39399.patch and note that the assertions you added show in red, when they should be in green).
This is probably an issue with the git diff
command that you used to prepare the patch file.
#3
@
8 years ago
Ha, thanks for pointing that out @jnylen0! New patch submitted that should be going in the right direction.
Adds two new assertions, modifies one assertion, per original ticket description.