Skip to content

Commit f457e4d

Browse files
committed
Add tests to check counts for delete all are correct
1 parent 6a9d783 commit f457e4d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

features/transient.feature

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,17 @@ Feature: Manage WordPress transient cache
141141
Warning: Transient with key "foo" is not set.
142142
"""
143143

144+
When I run `wp transient delete --all`
145+
And I run `wp transient set foo bar`
146+
And I run `wp transient set foo2 bar2 600`
147+
And I run `wp transient set foo3 bar3 --network`
148+
And I run `wp transient set foo4 bar4 600 --network`
149+
And I run `wp transient delete --all`
150+
Then STDOUT should be:
151+
"""
152+
Success: 4 transients deleted from the database.
153+
"""
154+
144155
Scenario: Network transient delete and other flags
145156
Given a WP multisite install
146157

@@ -211,3 +222,14 @@ Feature: Manage WordPress transient cache
211222
"""
212223
Warning: Transient with key "foo" is not set.
213224
"""
225+
226+
When I run `wp transient delete --all`
227+
And I run `wp transient set foo bar`
228+
And I run `wp transient set foo2 bar2 600`
229+
And I run `wp transient set foo3 bar3 --network`
230+
And I run `wp transient set foo4 bar4 600 --network`
231+
And I run `wp transient delete --all`
232+
Then STDOUT should be:
233+
"""
234+
Success: 4 transients deleted from the database.
235+
"""

0 commit comments

Comments
 (0)