@@ -45,61 +45,78 @@ Feature: Manage signups in a multisite installation
45
45
Given a WP multisite install
46
46
And I run `wp eval
'wpmu_signup_user( "bobuser", "[email protected] " );' `
47
47
48
+ When I run `wp signup get 1 --field=user_login`
49
+ Then STDOUT should be:
50
+ """
51
+ bobuser
52
+ """
53
+
48
54
When I run `wp signup get bobuser --fields=signup_id,user_login,user_email,active --format=csv`
49
55
Then STDOUT should be:
50
56
"""
51
57
signup_id,user_login,user_email,active
52
58
53
59
"""
54
60
55
- Scenario : Delete signup
61
+ Scenario : Activate signup
56
62
Given a WP multisite install
63
+ And I run `wp eval
'wpmu_signup_user( "bobuser", "[email protected] " );' `
57
64
58
- When I run `wp eval
'wpmu_signup_user( "bobuser", "[email protected] " );' `
59
- And I run `wp signup get bobuser --field=user_login`
65
+ When I run `wp signup get bobuser --field=active`
60
66
Then STDOUT should be:
61
67
"""
62
- bobuser
68
+ 0
63
69
"""
64
70
65
- When I run `wp signup delete bobuser@example.com `
66
- Then STDOUT should be :
71
+ When I run `wp signup activate bobuser`
72
+ Then STDOUT should contain :
67
73
"""
68
- Success: Signup 1 deleted .
74
+ Success: Signup 1 activated .
69
75
"""
70
76
71
- When I try `wp signup get bobuser`
77
+ When I try the previous command again
72
78
Then STDERR should be:
73
79
"""
74
- Error: Invalid signup ID, email, login, or activation key: 'bobuser'
80
+ Warning: Failed activating signup 1.
75
81
"""
76
82
77
- Scenario : Activate signup
83
+ When I run `wp signup get bobuser --field=active`
84
+ Then STDOUT should be:
85
+ """
86
+ 1
87
+ """
88
+
89
+ When I run `wp user get bobuser --field=user_email`
90
+ Then STDOUT should be:
91
+ """
92
+
93
+ """
94
+
95
+ Scenario : Activate multiple signups
78
96
Given a WP multisite install
79
97
And I run `wp eval
'wpmu_signup_user( "bobuser", "[email protected] " );' `
98
+ And I run `wp eval
'wpmu_signup_user( "johnuser", "[email protected] " );' `
80
99
81
- And I run `wp signup get bobuser --field=active `
100
+ When I run `wp signup list --active=0 --format=count `
82
101
Then STDOUT should be:
83
102
"""
84
- 0
103
+ 2
85
104
"""
86
105
87
- When I run `wp signup activate bobuser`
106
+ When I run `wp signup activate bobuser johnuser `
88
107
Then STDOUT should contain:
89
108
"""
90
109
Success: Signup 1 activated.
91
110
"""
92
-
93
- When I run `wp signup get bobuser --field=active`
94
- Then STDOUT should be:
111
+ And STDOUT should contain:
95
112
"""
96
- 1
113
+ Success: Signup 2 activated.
97
114
"""
98
115
99
- When I run `wp user get bobuser --field=user_email `
116
+ When I run `wp signup list --active=1 --format=count `
100
117
Then STDOUT should be:
101
118
"""
102
-
119
+ 2
103
120
"""
104
121
105
122
Scenario : Activate blog signup entry
@@ -124,3 +141,33 @@ Feature: Manage signups in a multisite installation
124
141
| domain | path |
125
142
| example .com | / |
126
143
| example .com | /bobsite / |
144
+
145
+ Scenario : Delete signups
146
+ Given a WP multisite install
147
+ And I run `wp eval
'wpmu_signup_user( "bobuser", "[email protected] " );' `
148
+ And I run `wp eval
'wpmu_signup_user( "johnuser", "[email protected] " );' `
149
+
150
+ When I run `wp signup get bobuser --field=user_email`
151
+ Then STDOUT should be:
152
+ """
153
+
154
+ """
155
+
156
+ When I run `wp signup get johnuser --field=user_email`
157
+ Then STDOUT should be:
158
+ """
159
+
160
+ """
161
+
162
+ When I run `wp signup delete bobuser@example.com johnuser@example.com`
163
+ Then STDOUT should be:
164
+ """
165
+ Success: Signup 1 deleted.
166
+ Success: Signup 2 deleted.
167
+ """
168
+
169
+ When I try `wp signup get bobuser`
170
+ Then STDERR should be:
171
+ """
172
+ Error: Invalid signup ID, email, login, or activation key: 'bobuser'
173
+ """
0 commit comments