Skip to content

Commit 0420e71

Browse files
swissspidyCopilot
andauthored
Update features/db-search.feature
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent bcfccbe commit 0420e71

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

features/db-search.feature

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -929,24 +929,27 @@ Feature: Search through the database
929929
And STDERR should be empty
930930

931931
Scenario: Search with exclude revisions option
932-
Given a WP install
933-
And I run `wp post create --post_content="This is the original post content." --post_title="Original Post"`
932+
And I run `wp post create --post_content="This is the original post content." --post_title="Original Post" --porcelain`
933+
Then save STDOUT as {POST_ID}
934934
# Create a revision
935-
And I run `wp post update 1 --post_content="This is the updated post content."`
935+
And I run `wp post update {POST_ID} --post_content="This is the updated post content."`
936+
When I run `wp post list --post_parent={POST_ID} --post_type=revision --field=ID`
937+
Then save STDOUT as {REVISION_ID}
938+
936939
When I run `wp db search "updated post content"`
937940
Then STDOUT should contain:
938941
"""
939942
wp_posts:post_content
940-
1:This is the updated post content.
943+
{POST_ID}:This is the updated post content.
941944
wp_posts:post_content
942-
5:This is the updated post content.
945+
{REVISION_ID}:This is the updated post content.
943946
"""
944-
947+
945948
When I run `wp db search "updated post content" --exclude_revisions`
946949
Then STDOUT should contain:
947950
"""
948951
wp_posts:post_content
949-
1:This is the updated post content.
952+
{POST_ID}:This is the updated post content.
950953
"""
951954
And STDERR should be empty
952955

0 commit comments

Comments
 (0)