Skip to content

Commit e675b11

Browse files
committed
Make transients delete test more robust
1 parent 0db0214 commit e675b11

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

features/transient.feature

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ Feature: Manage WordPress transient cache
5757

5858
Scenario: Deleting all transients on single site
5959
Given a WP install
60+
And I run `wp transient list --format=count`
61+
And save STDOUT as {EXISTING_TRANSIENTS}
62+
And I run `expr {EXISTING_TRANSIENTS} + 2`
63+
And save STDOUT as {EXPECTED_TRANSIENTS}
6064

6165
When I try `wp transient delete`
6266
Then STDERR should be:
@@ -71,7 +75,7 @@ Feature: Manage WordPress transient cache
7175
And I run `wp transient delete --all`
7276
Then STDOUT should be:
7377
"""
74-
Success: 2 transients deleted from the database.
78+
Success: {EXPECTED_TRANSIENTS} transients deleted from the database.
7579
"""
7680

7781
When I try `wp transient get foo`

0 commit comments

Comments
 (0)