Skip to content

Commit

Permalink
Add behat test for exclude_revisions flag
Browse files Browse the repository at this point in the history
  • Loading branch information
rajkp committed Jun 25, 2024
1 parent 38ee18a commit 95cfad1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions features/db-search.feature
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,29 @@ Feature: Search through the database
"""
And STDERR should be empty

Scenario: Search with exclude revisions option
Given a WP install
And I run `wp post create --post_content="This is the original post content." --post_title="Original Post"`
# Create a revision
And I run `wp post update 1 --post_content="This is the updated post content."`

When I run `wp db search "updated post content"`
Then STDOUT should contain:
"""
wp_posts:post_content
1:This is the updated post content.
wp_posts:post_content
5:This is the updated post content.
"""

When I run `wp db search "updated post content" --exclude_revisions`
Then STDOUT should contain:
"""
wp_posts:post_content
1:This is the updated post content.
"""
And STDERR should be empty

Scenario: Search with custom colors
Given a WP install

Expand Down

0 comments on commit 95cfad1

Please # to comment.