diff --git a/features/post.feature b/features/post.feature index e1f4ec34..b1d9d84e 100644 --- a/features/post.feature +++ b/features/post.feature @@ -57,6 +57,16 @@ Feature: Manage WordPress posts When I try the previous command again Then the return code should be 1 + Scenario: Updating an invalid post should exit with an error + Given a WP install + + When I try `wp post update 22 --post_title=Foo` + Then the return code should be 1 + And STDERR should contain: + """ + Warning: Invalid post ID. + """ + Scenario: Setting post categories When I run `wp term create category "First Category" --porcelain` And save STDOUT as {TERM_ID} diff --git a/features/term.feature b/features/term.feature index 7a967571..f0440f16 100644 --- a/features/term.feature +++ b/features/term.feature @@ -57,6 +57,16 @@ Feature: Manage WordPress terms """ And the return code should be 1 + Scenario: Updating an invalid term should exit with an error + Given a WP install + + When I try `wp term update category 22 --name=Foo` + Then the return code should be 1 + And STDERR should contain: + """ + Error: Term doesn't exist. + """ + Scenario: Creating/deleting a term When I run `wp term create post_tag 'Test delete term' --slug=test-delete --description='This is a test term to be deleted' --porcelain` Then STDOUT should be a number