Skip to content

Commit

Permalink
updated the tests for exclude parameter when bulk updating the themes…
Browse files Browse the repository at this point in the history
… and plugins
  • Loading branch information
Nikschavan committed May 30, 2017
1 parent 44e3d62 commit 2d4a0eb
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
22 changes: 20 additions & 2 deletions features/plugin-update.feature
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,30 @@ Feature: Update WordPress plugins
Scenario: Exclude plugin updates from bulk updates.
Given a WP install

When I run `wp plugin update --all --exclude=akismet`
Then STDOUT should not contain:
When I run `wp plugin install akismet --version=3.0.0 --force`
Then STDOUT should contain:
""""
Downloading install package from https://downloads.wordpress.org/plugin/akismet.3.0.0.zip...
""""
When I run `wp plugin status akismet`
Then STDOUT should contain:
""""
Update available
""""
When I run `wp plugin update --all --exclude=akismet | grep 'Skipped'`
Then STDOUT should contain:
"""
akismet
"""
When I run `wp plugin status akismet`
Then STDOUT should contain:
""""
Update available
""""
Scenario: Update a plugin to its latest patch release
Given a WP install
And I run `wp plugin install --force akismet --version=2.5.4`
Expand Down
24 changes: 21 additions & 3 deletions features/theme.feature
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,30 @@ Feature: Manage WordPress themes
Scenario: Exclude theme from bulk updates.
Given a WP install

When I run `wp theme update --all --exclude=twentysixteen`
Then STDOUT should not contain:
When I run `wp theme install p2 --version=1.4.1 --force`
Then STDOUT should contain:
""""
Downloading install package from https://downloads.wordpress.org/theme/p2.1.4.1.zip...
""""
When I run `wp theme status p2`
Then STDOUT should contain:
""""
Update available
""""
When I run `wp theme update --all --exclude=p2 | grep 'Skipped'`
Then STDOUT should contain:
"""
twentysixteen
p2
"""
When I run `wp theme status p2`
Then STDOUT should contain:
""""
Update available
""""
Scenario: Get the path of an installed theme
Given a WP install
Expand Down

0 comments on commit 2d4a0eb

Please sign in to comment.