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
57
57
When I try the previous command again
58
58
Then the return code should be 1
59
59
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
+
60
70
Scenario : Setting post categories
61
71
When I run `wp term create category "First Category" --porcelain`
62
72
And save STDOUT as {TERM_ID}
Original file line number Diff line number Diff line change @@ -57,6 +57,16 @@ Feature: Manage WordPress terms
57
57
"""
58
58
And the return code should be 1
59
59
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
+
60
70
Scenario : Creating/deleting a term
61
71
When I run `wp term create post_tag 'Test delete term' --slug=test-delete --description='This is a test term to be deleted' --porcelain`
62
72
Then STDOUT should be a number
You can’t perform that action at this time.
0 commit comments