@@ -112,3 +112,55 @@ Feature: Generate new WordPress posts
112112 """
113113 2018-07-04 00:00:00
114114 """
115+
116+ Scenario : Generating posts with post_date argument with hyphenated time
117+ When I run `wp post generate --count=1 --post_date="2018-07-05-17:17:17" `
118+ And I run `wp post list --field=post_date`
119+ Then STDOUT should contain:
120+ """
121+ 2018-07-05 17:17:17
122+ """
123+ And I run `wp post list --field=post_date_gmt`
124+ Then STDOUT should contain:
125+ """
126+ 2018-07-05 17:17:17
127+ """
128+
129+ Scenario : Generating posts with post_date_gmt argument with hyphenated time
130+ When I run `wp post generate --count=1 --post_date_gmt="2018-07-06-12:12:12" `
131+ And I run `wp post list --field=post_date`
132+ Then STDOUT should contain:
133+ """
134+ 2018-07-06 12:12:12
135+ """
136+ And I run `wp post list --field=post_date_gmt`
137+ Then STDOUT should contain:
138+ """
139+ 2018-07-06 12:12:12
140+ """
141+
142+ Scenario : Generating posts with different post_date & post_date_gmt argument without time
143+ When I run `wp post generate --count=1 --post_date="1999-12-31" --post_date_gmt="2000-01-01" `
144+ And I run `wp post list --field=post_date`
145+ Then STDOUT should contain:
146+ """
147+ 1999-12-31 00:00:00
148+ """
149+ And I run `wp post list --field=post_date_gmt`
150+ Then STDOUT should contain:
151+ """
152+ 2000-01-01 00:00:00
153+ """
154+
155+ Scenario : Generating posts with different post_date & post_date_gmt argument with time
156+ When I run `wp post generate --count=1 --post_date="1999-12-31 11:11:00" --post_date_gmt="2000-01-01 02:11:00" `
157+ And I run `wp post list --field=post_date`
158+ Then STDOUT should contain:
159+ """
160+ 1999-12-31 11:11:00
161+ """
162+ And I run `wp post list --field=post_date_gmt`
163+ Then STDOUT should contain:
164+ """
165+ 2000-01-01 02:11:00
166+ """
0 commit comments