Skip to content

Commit 8503d88

Browse files
committed
Fix tests
1 parent b18631e commit 8503d88

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

features/post-revision.feature

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,16 +160,18 @@ Feature: Manage WordPress post revisions
160160
And I run `wp post update {POST_ID} --post_content='Version 4'`
161161
And I run `wp post update {POST_ID} --post_content='Version 5'`
162162

163+
# The initial post does not create a revision.
164+
# See https://core.trac.wordpress.org/ticket/30854
163165
And I run `wp post list --post_type=revision --post_parent={POST_ID} --format=count`
164166
Then STDOUT should be:
165167
"""
166-
5
168+
4
167169
"""
168170

169171
When I run `wp post revision prune {POST_ID} --latest=2 --yes`
170172
Then STDOUT should contain:
171173
"""
172-
Success: Deleted 3 revisions for post {POST_ID}.
174+
Success: Deleted 2 revisions for post {POST_ID}.
173175
"""
174176

175177
When I run `wp post list --post_type=revision --post_parent={POST_ID} --format=count`
@@ -187,16 +189,18 @@ Feature: Manage WordPress post revisions
187189
And I run `wp post update {POST_ID} --post_content='Version 3'`
188190
And I run `wp post update {POST_ID} --post_content='Version 4'`
189191

192+
# The initial post does not create a revision.
193+
# See https://core.trac.wordpress.org/ticket/30854
190194
And I run `wp post list --post_type=revision --post_parent={POST_ID} --format=count`
191195
Then STDOUT should be:
192196
"""
193-
4
197+
3
194198
"""
195199

196200
When I run `wp post revision prune {POST_ID} --earliest=2 --yes`
197201
Then STDOUT should contain:
198202
"""
199-
Success: Deleted 2 revisions for post {POST_ID}.
203+
Success: Deleted 1 revision for post {POST_ID}.
200204
"""
201205

202206
When I run `wp post list --post_type=revision --post_parent={POST_ID} --format=count`

0 commit comments

Comments
 (0)