OSDN Git Service

A more precise test
authorDaniel Bachhuber <d@danielbachhuber.com>
Sun, 6 Oct 2013 15:33:18 +0000 (17:33 +0200)
committerDaniel Bachhuber <d@danielbachhuber.com>
Sun, 6 Oct 2013 15:33:18 +0000 (17:33 +0200)
See https://github.com/wp-cli/wp-cli/pull/777#discussion_r6787013

features/post.feature

index b97f1c2..d4231c8 100644 (file)
@@ -108,10 +108,11 @@ Feature: Manage WordPress posts
       | Publish post | publish-post | publish      |
       | Draft post   |              | draft        |
 
-    When I run `wp post list --post_type='post' --post__in={POST_ID} --fields=post_title,post_name,post_status --format=csv`
-    Then STDOUT should be CSV containing:
-      | post_title   | post_name    | post_status  |
-      | Publish post | publish-post | publish      |
+    When I run `wp post list --post__in={POST_ID} --format=count`
+    Then STDOUT should be:
+      """
+      1
+      """
 
     When I run `wp post list --post_type='page' --field=title`
     Then STDOUT should be: