@@ -60,3 +60,107 @@ Feature: Generate new WordPress posts
6060 howdy-3
6161 """
6262 And STDERR should be empty
63+
64+ Scenario : Generating posts with post_date argument without time
65+ When I run `wp post generate --count=1 --post_date="2018-07-01" `
66+ And I run `wp post list --field=post_date`
67+ Then STDOUT should contain:
68+ """
69+ 2018-07-01 00:00:00
70+ """
71+ And I run `wp post list --field=post_date_gmt`
72+ Then STDOUT should contain:
73+ """
74+ 2018-07-01 00:00:00
75+ """
76+
77+ Scenario : Generating posts with post_date argument with time
78+ When I run `wp post generate --count=1 --post_date="2018-07-02 02:21:05" `
79+ And I run `wp post list --field=post_date`
80+ Then STDOUT should contain:
81+ """
82+ 2018-07-02 02:21:05
83+ """
84+ And I run `wp post list --field=post_date_gmt`
85+ Then STDOUT should contain:
86+ """
87+ 2018-07-02 02:21:05
88+ """
89+
90+ Scenario : Generating posts with post_date_gmt argument without time
91+ When I run `wp post generate --count=1 --post_date_gmt="2018-07-03" `
92+ And I run `wp post list --field=post_date`
93+ Then STDOUT should contain:
94+ """
95+ 2018-07-03 00:00:00
96+ """
97+ And I run `wp post list --field=post_date_gmt`
98+ Then STDOUT should contain:
99+ """
100+ 2018-07-03 00:00:00
101+ """
102+
103+ Scenario : Generating posts with post_date_gmt argument with time
104+ When I run `wp post generate --count=1 --post_date_gmt="2018-07-04 12:34:56" `
105+ And I run `wp post list --field=post_date`
106+ Then STDOUT should contain:
107+ """
108+ 2018-07-04 12:34:56
109+ """
110+ And I run `wp post list --field=post_date_gmt`
111+ Then STDOUT should contain:
112+ """
113+ 2018-07-04 12:34:56
114+ """
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