-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement --all in signup delete command
- Loading branch information
1 parent
b266645
commit 0d2e74a
Showing
3 changed files
with
98 additions
and
17 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
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 |
---|---|---|
|
@@ -156,14 +156,37 @@ Feature: Manage signups in a multisite installation | |
""" | ||
|
||
When I run `wp user signup delete bobuser@example.com johnuser@example.com` | ||
Then STDOUT should be: | ||
Then STDOUT should contain: | ||
""" | ||
Success: Signup 1 deleted. | ||
Success: Signup 2 deleted. | ||
Success: Deleted 2 of 2 signups. | ||
""" | ||
|
||
When I try `wp user signup get bobuser` | ||
Then STDERR should be: | ||
""" | ||
Error: Invalid signup ID, email, login, or activation key: 'bobuser' | ||
""" | ||
|
||
Scenario: Delete all signups | ||
Given a WP multisite install | ||
And I run `wp eval 'wpmu_signup_user( "bobuser", "[email protected]" );'` | ||
And I run `wp eval 'wpmu_signup_user( "johnuser", "[email protected]" );'` | ||
|
||
When I try `wp user signup delete` | ||
Then STDERR should be: | ||
""" | ||
Error: You need to specify either one or more signups or provide the --all flag. | ||
""" | ||
|
||
When I run `wp user signup delete --all` | ||
Then STDOUT should contain: | ||
""" | ||
Success: Deleted all signups. | ||
""" | ||
|
||
When I run `wp user signup list --format=count` | ||
Then STDOUT should be: | ||
""" | ||
0 | ||
""" | ||
|
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