-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Not comprehensive testing, but they do currently pass.
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Feature: Co-authors can be renamed | ||
|
||
Background: | ||
Given a WP installation with the Co-Authors Plus plugin | ||
|
||
Scenario: Error on a missing required --from parameter | ||
When I try `wp co-authors-plus rename-coauthor --to="still-not-a-user"` | ||
Then STDERR should be: | ||
""" | ||
Error: Parameter errors: | ||
missing --from parameter | ||
""" | ||
|
||
Scenario: Error on a missing required --to parameter | ||
When I try `wp co-authors-plus rename-coauthor --from="not-a-user"` | ||
Then STDERR should be: | ||
""" | ||
Error: Parameter errors: | ||
missing --to parameter | ||
""" | ||
|
||
Scenario: Error on an invalid co-author | ||
When I try `wp co-authors-plus rename-coauthor --from="not-a-user" --to="still-not-a-user"` | ||
Then STDERR should be: | ||
""" | ||
Error: No co-author found for not-a-user | ||
""" | ||
|
||
Scenario: Try to rename co-author to the same name | ||
When I try `wp co-authors-plus create-guest-authors` | ||
Then I try `wp co-authors-plus rename-coauthor --from="admin" --to="admin"` | ||
Then STDERR should be: | ||
""" | ||
Error: New user_login value conflicts with existing co-author | ||
""" | ||
|
||
Scenario: Rename co-author | ||
When I run `wp co-authors-plus create-guest-authors` | ||
Then I run `wp co-authors-plus rename-coauthor --from="admin" --to="renamed-admin"` | ||
Then STDOUT should be: | ||
""" | ||
Renaming admin to renamed-admin | ||
Updated guest author profile value too | ||
Success: All done! | ||
""" |