Skip to content

Commit 916be42

Browse files
author
Govind Kumar
committed
Added test case for multiple post generate with post_title and post_name
1 parent 33a01a1 commit 916be42

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

features/post-generate.feature

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,24 @@ Feature: Generate new WordPress posts
4141
"""
4242
Success:
4343
"""
44-
Scenario: Generating post and output title
45-
When I run `wp post generate --count=1 --post_title=Howdy!`
46-
And I run `wp post list --field=post_title --posts_per_page=1`
44+
45+
Scenario: Generating post and outputting title and name
46+
When I run `wp post generate --count=3 --post_title=Howdy!`
47+
When I run `wp post list --format=count`
48+
And save STDOUT as {POST_COUNT}
49+
And I run `wp post list --field=post_title --posts_per_page={POST_COUNT}`
4750
Then STDOUT should contain:
4851
"""
4952
Howdy!
53+
Howdy! 2
54+
Howdy! 3
55+
"""
56+
And STDERR should be empty
57+
And I run `wp post list --field=post_name --posts_per_page={POST_COUNT}`
58+
Then STDOUT should contain:
59+
"""
60+
howdy
61+
howdy-2
62+
howdy-3
5063
"""
5164
And STDERR should be empty

0 commit comments

Comments
 (0)