Skip to content

Commit de56a29

Browse files
committed
Fix post test
The `post_date` field has a different format when using SQLite
1 parent 4ba6fff commit de56a29

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

features/post.feature

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ Feature: Manage WordPress posts
457457
2005-01-24 09:52:00
458458
"""
459459

460+
@require-mysql
460461
Scenario: Publishing a post and setting a date succeeds if the edit_date flag is passed.
461462
Given a WP install
462463

@@ -473,4 +474,23 @@ Feature: Manage WordPress posts
473474
Then STDOUT should contain:
474475
"""
475476
2005-01-24 09:52:00
476-
"""
477+
"""
478+
479+
@require-sqlite
480+
Scenario: Publishing a post and setting a date succeeds if the edit_date flag is passed.
481+
Given a WP install
482+
483+
When I run `wp post create --post_title='test' --porcelain`
484+
Then save STDOUT as {POST_ID}
485+
486+
When I run `wp post update {POST_ID} --post_date='2005-01-24T09:52:00.000Z' --post_status='publish' --edit_date=1`
487+
Then STDOUT should contain:
488+
"""
489+
Success:
490+
"""
491+
492+
When I run `wp post get {POST_ID} --field=post_date`
493+
Then STDOUT should contain:
494+
"""
495+
2005-01-24T09:52:00.000Z
496+
"""

0 commit comments

Comments
 (0)