OSDN Git Service

Test `wp term get`
authorDaniel Bachhuber <d@danielbachhuber.com>
Tue, 20 Aug 2013 15:07:52 +0000 (08:07 -0700)
committerDaniel Bachhuber <d@danielbachhuber.com>
Tue, 20 Aug 2013 15:07:52 +0000 (08:07 -0700)
features/term.feature

index 97b5ad5..076f656 100644 (file)
@@ -5,6 +5,7 @@ Feature: Manage WordPress terms
 
     When I run `wp term create 'Test term' post_tag --slug=test --description='This is a test term' --porcelain`
     Then STDOUT should be a number
+    And save STDOUT as {TERM_ID}
 
     When I try the previous command again
     Then STDERR should not be empty
@@ -20,6 +21,12 @@ Feature: Manage WordPress terms
       | name      | slug |
       | Test term | test |
 
+    When I run `wp term get {TERM_ID} post_tag`
+    Then STDOUT should be a table containing rows:
+      | Field     | Value      |
+      | term_id   | {TERM_ID}  |
+      | name      | Test term  |
+
   Scenario: Creating/deleting a term
     Given a WP install