File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -379,6 +379,26 @@ Feature: Manage WordPress users
379379 administrator
380380 """
381381
382+ Scenario: Show error when trying to remove capability same as role
383+ Given a WP install
384+
385+ When I run `wp user create testuser2 [email protected] --first_name=test --last_name=user --role=contributor --porcelain` 386+ Then STDOUT should be a number
387+ And save STDOUT as {USER_ID}
388+
389+ When I run `wp user list-caps {USER_ID}`
390+ Then STDOUT should contain:
391+ """
392+ contributor
393+ """
394+
395+ When I run `wp user remove-cap {USER_ID}` contributor
396+ Then the return code should be 1
397+ And STDERR should be:
398+ """
399+ Error: There is a role similar to 'contributor' capability. Use `wp user remove-role` instead.
400+ """
401+
382402 Scenario: Managing user capabilities
383403 Given a WP install
384404
You can’t perform that action at this time.
0 commit comments