Skip to content

Commit b5e56b5

Browse files
committed
Fix test
1 parent 30eeaaa commit b5e56b5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

features/user.feature

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,26 @@ Feature: Manage WordPress users
267267
Bob Jones
268268
"""
269269
270+
# The error message changed in WP 5.9.
271+
@less-than-wp-5.9
272+
Scenario: Creating a user with an existing email in multisite shows a clean error message
273+
Given a WP multisite install
274+
275+
When I run `wp user create bobjones bobjones@example.com`
276+
Then STDOUT should not be empty
277+
278+
When I try `wp user create bobjones2 bobjones@example.com`
279+
Then STDERR should contain:
280+
"""
281+
Sorry, that email address is already used!
282+
"""
283+
And STDERR should not contain:
284+
"""
285+
<
286+
"""
287+
And the return code should be 1
288+
289+
@require-wp-5.9
270290
Scenario: Creating a user with an existing email in multisite shows a clean error message
271291
Given a WP multisite install
272292

0 commit comments

Comments
 (0)