File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,16 @@ Feature: Manage WordPress posts
5757 When I try the previous command again
5858 Then the return code should be 1
5959
60+ Scenario : Updating an invalid post should exit with an error
61+ Given a WP install
62+
63+ When I try `wp post update 22 --post_title=Foo`
64+ Then the return code should be 1
65+ And STDERR should contain:
66+ """
67+ Warning: Invalid post ID.
68+ """
69+
6070 Scenario : Setting post categories
6171 When I run `wp term create category "First Category" --porcelain`
6272 And save STDOUT as {TERM_ID}
Original file line number Diff line number Diff line change @@ -57,6 +57,16 @@ Feature: Manage WordPress terms
5757 """
5858 And the return code should be 1
5959
60+ Scenario : Updating an invalid term should exit with an error
61+ Given a WP install
62+
63+ When I try `wp term update category 22 --name=Foo`
64+ Then the return code should be 1
65+ And STDERR should contain:
66+ """
67+ Error: Term doesn't exist.
68+ """
69+
6070 Scenario : Creating/deleting a term
6171 When I run `wp term create post_tag 'Test delete term' --slug=test-delete --description='This is a test term to be deleted' --porcelain`
6272 Then STDOUT should be a number
You can’t perform that action at this time.
0 commit comments