Skip to content

Commit 95cfad1

Browse files
author
rajkp
committed
Add behat test for exclude_revisions flag
1 parent 38ee18a commit 95cfad1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

features/db-search.feature

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,29 @@ Feature: Search through the database
914914
"""
915915
And STDERR should be empty
916916

917+
Scenario: Search with exclude revisions option
918+
Given a WP install
919+
And I run `wp post create --post_content="This is the original post content." --post_title="Original Post"`
920+
# Create a revision
921+
And I run `wp post update 1 --post_content="This is the updated post content."`
922+
923+
When I run `wp db search "updated post content"`
924+
Then STDOUT should contain:
925+
"""
926+
wp_posts:post_content
927+
1:This is the updated post content.
928+
wp_posts:post_content
929+
5:This is the updated post content.
930+
"""
931+
932+
When I run `wp db search "updated post content" --exclude_revisions`
933+
Then STDOUT should contain:
934+
"""
935+
wp_posts:post_content
936+
1:This is the updated post content.
937+
"""
938+
And STDERR should be empty
939+
917940
Scenario: Search with custom colors
918941
Given a WP install
919942

0 commit comments

Comments
 (0)