Test post endpoints #99

Merged
merged 38 commits into from Jun 2, 2014

Conversation

Projects
None yet
2 participants
@rachelbaker
Member

rachelbaker commented May 26, 2014

The WP_JSON_Posts endpoints should be tested to ensure they return a reliable representation of posts.

@rmccue rmccue added this to the 1.0 milestone Mar 4, 2014

This was referenced Mar 4, 2014

@rmccue rmccue modified the milestones: 1.1, 1.0 Apr 9, 2014

@rachelbaker rachelbaker self-assigned this May 26, 2014

@rachelbaker

This comment has been minimized.

Show comment
Hide comment
@rachelbaker

rachelbaker May 26, 2014

Member

Began adding unit tests for the /posts/ endpoints, still a long way to go to get close to full coverage.

Member

rachelbaker commented May 26, 2014

Began adding unit tests for the /posts/ endpoints, still a long way to go to get close to full coverage.

@rmccue rmccue referenced this pull request May 27, 2014

Merged

Fix errors with excerpt #226

tests/test_json_posts.php
+ }
+
+ // Check post dates.
+ $timezone = $this->fake_server->get_timezone();

This comment has been minimized.

@rmccue

rmccue May 27, 2014

Member

This returns null, since everything is stubbed out, but the same happens internally too, so...

@rmccue

rmccue May 27, 2014

Member

This returns null, since everything is stubbed out, but the same happens internally too, so...

@rmccue

This comment has been minimized.

Show comment
Hide comment
@rmccue

rmccue May 27, 2014

Member

Coverage is currently at 47.96%.

Member

rmccue commented May 27, 2014

Coverage is currently at 47.96%.

@rmccue

This comment has been minimized.

Show comment
Hide comment
@rmccue

rmccue Jun 2, 2014

Member

We're now at 54% coverage for tests (my previous figure was wrong; it was closer to 10%); more importantly, insert_post is at 81%, with that figure to increase dramatically once #218 and #286 are fixed.

Merging for now so that we can avoid this going stale, and so that it helps us in the mean time. More tests to come!

Member

rmccue commented Jun 2, 2014

We're now at 54% coverage for tests (my previous figure was wrong; it was closer to 10%); more importantly, insert_post is at 81%, with that figure to increase dramatically once #218 and #286 are fixed.

Merging for now so that we can avoid this going stale, and so that it helps us in the mean time. More tests to come!

rmccue added a commit that referenced this pull request Jun 2, 2014

@rmccue rmccue merged commit bc40226 into master Jun 2, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@rmccue rmccue deleted the test-post-endpoints branch Jun 2, 2014

@rachelbaker

This comment has been minimized.

Show comment
Hide comment
@rachelbaker

rachelbaker Jun 2, 2014

Member

👏

Member

rachelbaker commented Jun 2, 2014

👏

kellbot pushed a commit to kellbot/WP-API that referenced this pull request Aug 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment