Skip to content

Commit d26ca67

Browse files
committed
Fix test issues
1 parent ef614ce commit d26ca67

File tree

2 files changed

+26
-16
lines changed

2 files changed

+26
-16
lines changed

features/plugin-update.feature

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@ Feature: Update WordPress plugins
5050

5151
When I run `wp plugin install wordpress-importer --version=0.5 --force`
5252
Then STDOUT should contain:
53-
""""
53+
"""
5454
Downloading install
55-
""""
55+
"""
5656
And STDOUT should contain:
57-
""""
57+
"""
5858
package from https://downloads.wordpress.org/plugin/wordpress-importer.0.5.zip...
59-
""""
59+
"""
6060

6161
When I run `wp plugin status wordpress-importer`
6262
Then STDOUT should contain:
63-
""""
63+
"""
6464
Update available
65-
""""
65+
"""
6666

6767
When I run `wp plugin update --all --exclude=wordpress-importer | grep 'Skipped'`
6868
Then STDOUT should contain:
@@ -72,9 +72,9 @@ Feature: Update WordPress plugins
7272

7373
When I run `wp plugin status wordpress-importer`
7474
Then STDOUT should contain:
75-
""""
75+
"""
7676
Update available
77-
""""
77+
"""
7878

7979
Scenario: Update a plugin to its latest patch release
8080
Given a WP install
@@ -196,15 +196,25 @@ Feature: Update WordPress plugins
196196
Scenario: Plugin updates that error should not report a success
197197
Given a WP install
198198
And I run `wp plugin install --force akismet --version=4.0`
199-
And I run `chmod -w wp-content/plugins/akismet`
199+
200+
When I run `chmod -w wp-content/plugins/akismet`
200201
And I try `wp plugin update akismet`
201-
And save STDERR as {ERROR}
202-
And I run `chmod +w wp-content/plugins/akismet`
202+
Then STDERR should contain:
203+
"""
204+
Error:
205+
"""
206+
Then STDOUT should not contain:
207+
"""
208+
Success:
209+
"""
203210

204-
And I run `echo "{ERROR}"`
211+
When I run `chmod +w wp-content/plugins/akismet`
212+
And I try `wp plugin update akismet`
213+
Then STDERR should not contain:
214+
"""
215+
Error:
216+
"""
205217
Then STDOUT should contain:
206218
"""
207-
Error:
219+
Success:
208220
"""
209-
210-

features/plugin.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Feature: Manage WordPress plugins
171171
"""
172172
Warning: The 'xxx' plugin could not be found.
173173
"""
174-
Then STDERR should contain:
174+
And STDERR should contain:
175175
"""
176176
Warning: The 'yyy' plugin could not be found.
177177
"""

0 commit comments

Comments
 (0)