Skip to content

Commit 4e0e86f

Browse files
Add tests
1 parent 5c4e18c commit 4e0e86f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

features/user.feature

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,28 @@ Feature: Manage WordPress users
8585
"""
8686
And the return code should be 1
8787

88+
When I run `wp user create testuser3b testuser3b@example.com --user_pass="test\"user3b's\pass\!"`
89+
Then STDOUT should not contain:
90+
"""
91+
Password:
92+
"""
93+
94+
# Check password without the `--escape-chars` option.
95+
When I try `wp user check-password testuser3b "test\"user3b's\pass\!"`
96+
Then STDERR should be:
97+
"""
98+
Warning: Password contains characters that need to be escaped. Please escape them manually or use the `--escape-chars` option.
99+
"""
100+
And the return code should be 1
101+
102+
# Check password with the `--escape-chars` option.
103+
When I try `wp user check-password testuser3b "test\"user3b's\pass\!" --escape-chars`
104+
Then the return code should be 0
105+
106+
# Check password with manually escaped characters.
107+
When I try `wp user check-password testuser3b "test\\\"user3b\'s\\\pass\\\!"`
108+
Then the return code should be 0
109+
88110
Scenario: Reassigning user posts
89111
Given a WP multisite install
90112

0 commit comments

Comments
 (0)