@@ -6,7 +6,8 @@ Feature: Date filter on collections
66 @createSchema
77 Scenario : Get collection filtered by date
88 Given there are 30 dummy objects with dummyDate
9- When I send a "GET" request to "/dummies?dummyDate[after]=2015-04-28"
9+ When I add "Accept" header equal to "application/ld+json"
10+ And I send a "GET" request to "/dummies?dummyDate[after]=2015-04-28"
1011 Then the response status code should be 200
1112 And the response should be in JSON
1213 And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
@@ -49,7 +50,8 @@ Feature: Date filter on collections
4950 }
5051 """
5152
52- When I send a "GET" request to "/dummies?dummyDate[before]=2015-04-05"
53+ When I add "Accept" header equal to "application/ld+json"
54+ And I send a "GET" request to "/dummies?dummyDate[before]=2015-04-05"
5355 Then the response status code should be 200
5456 And the response should be in JSON
5557 And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
@@ -92,7 +94,8 @@ Feature: Date filter on collections
9294 }
9395 """
9496
95- When I send a "GET" request to "/dummies?dummyDate[after]=2015-04-28T00:00:00%2B00:00"
97+ When I add "Accept" header equal to "application/ld+json"
98+ And I send a "GET" request to "/dummies?dummyDate[after]=2015-04-28T00:00:00%2B00:00"
9699 Then the response status code should be 200
97100 And the response should be in JSON
98101 And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
@@ -134,7 +137,8 @@ Feature: Date filter on collections
134137 }
135138 """
136139
137- When I send a "GET" request to "/dummies?dummyDate[before]=2015-04-05Z"
140+ When I add "Accept" header equal to "application/ld+json"
141+ And I send a "GET" request to "/dummies?dummyDate[before]=2015-04-05Z"
138142 Then the response status code should be 200
139143 And the response should be in JSON
140144 And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
@@ -179,7 +183,8 @@ Feature: Date filter on collections
179183
180184 Scenario : Search for entities within a range
181185 # The order should not influence the search
182- When I send a "GET" request to "/dummies?dummyDate[before]=2015-04-05&dummyDate[after]=2015-04-05"
186+ When I add "Accept" header equal to "application/ld+json"
187+ And I send a "GET" request to "/dummies?dummyDate[before]=2015-04-05&dummyDate[after]=2015-04-05"
183188 Then the response status code should be 200
184189 And the response should be in JSON
185190 And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
@@ -216,7 +221,8 @@ Feature: Date filter on collections
216221 }
217222 """
218223
219- When I send a "GET" request to "/dummies?dummyDate[after]=2015-04-05&dummyDate[before]=2015-04-05"
224+ When I add "Accept" header equal to "application/ld+json"
225+ And I send a "GET" request to "/dummies?dummyDate[after]=2015-04-05&dummyDate[before]=2015-04-05"
220226 Then the response status code should be 200
221227 And the response should be in JSON
222228 And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
@@ -285,7 +291,8 @@ Feature: Date filter on collections
285291
286292 Scenario : Get collection filtered by association date
287293 Given there are 30 dummy objects with dummyDate and relatedDummy
288- When I send a "GET" request to "/dummies?relatedDummy.dummyDate[after]=2015-04-28"
294+ When I add "Accept" header equal to "application/ld+json"
295+ And I send a "GET" request to "/dummies?relatedDummy.dummyDate[after]=2015-04-28"
289296 Then the response status code should be 200
290297 And the response should be in JSON
291298 And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
@@ -329,7 +336,8 @@ Feature: Date filter on collections
329336 }
330337 """
331338
332- When I send a "GET" request to "/dummies?relatedDummy.dummyDate[after]=2015-04-28&relatedDummy_dummyDate[after]=2015-04-28"
339+ When I add "Accept" header equal to "application/ld+json"
340+ And I send a "GET" request to "/dummies?relatedDummy.dummyDate[after]=2015-04-28&relatedDummy_dummyDate[after]=2015-04-28"
333341 Then the response status code should be 200
334342 And the response should be in JSON
335343 And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
@@ -373,7 +381,8 @@ Feature: Date filter on collections
373381 }
374382 """
375383
376- When I send a "GET" request to "/dummies?relatedDummy.dummyDate[after]=2015-04-28T00:00:00%2B00:00"
384+ When I add "Accept" header equal to "application/ld+json"
385+ And I send a "GET" request to "/dummies?relatedDummy.dummyDate[after]=2015-04-28T00:00:00%2B00:00"
377386 Then the response status code should be 200
378387 And the response should be in JSON
379388 And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
@@ -461,13 +470,15 @@ Feature: Date filter on collections
461470 @createSchema
462471 Scenario : Get collection filtered by date that is not a datetime including null after
463472 Given there are 3 dummydate objects with nullable dateIncludeNullAfter
464- When I send a "GET" request to "/dummy_dates?dateIncludeNullAfter[after]=2015-04-02"
473+ When I add "Accept" header equal to "application/ld+json"
474+ And I send a "GET" request to "/dummy_dates?dateIncludeNullAfter[after]=2015-04-02"
465475 Then the response status code should be 200
466476 And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
467477 And the JSON node "hydra:totalItems" should be equal to 2
468478 And the JSON node "hydra:member[0].dateIncludeNullAfter" should be equal to "2015-04-02T00:00:00+00:00"
469479 And the JSON node "hydra:member[1].dateIncludeNullAfter" should be null
470- When I send a "GET" request to "/dummy_dates?dateIncludeNullAfter[before]=2015-04-02"
480+ When I add "Accept" header equal to "application/ld+json"
481+ And I send a "GET" request to "/dummy_dates?dateIncludeNullAfter[before]=2015-04-02"
471482 Then the response status code should be 200
472483 And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
473484 And the JSON node "hydra:totalItems" should be equal to 2
@@ -477,13 +488,15 @@ Feature: Date filter on collections
477488 @createSchema
478489 Scenario : Get collection filtered by date that is not a datetime including null before
479490 Given there are 3 dummydate objects with nullable dateIncludeNullBefore
480- When I send a "GET" request to "/dummy_dates?dateIncludeNullBefore[before]=2015-04-01"
491+ When I add "Accept" header equal to "application/ld+json"
492+ And I send a "GET" request to "/dummy_dates?dateIncludeNullBefore[before]=2015-04-01"
481493 Then the response status code should be 200
482494 And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
483495 And the JSON node "hydra:totalItems" should be equal to 2
484496 And the JSON node "hydra:member[0].dateIncludeNullBefore" should be equal to "2015-04-01T00:00:00+00:00"
485497 And the JSON node "hydra:member[1].dateIncludeNullBefore" should be null
486- When I send a "GET" request to "/dummy_dates?dateIncludeNullBefore[after]=2015-04-01"
498+ When I add "Accept" header equal to "application/ld+json"
499+ And I send a "GET" request to "/dummy_dates?dateIncludeNullBefore[after]=2015-04-01"
487500 Then the response status code should be 200
488501 And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
489502 And the JSON node "hydra:totalItems" should be equal to 2
@@ -493,13 +506,15 @@ Feature: Date filter on collections
493506 @createSchema
494507 Scenario : Get collection filtered by date that is not a datetime including null before and after
495508 Given there are 3 dummydate objects with nullable dateIncludeNullBeforeAndAfter
496- When I send a "GET" request to "/dummy_dates?dateIncludeNullBeforeAndAfter[before]=2015-04-01"
509+ When I add "Accept" header equal to "application/ld+json"
510+ And I send a "GET" request to "/dummy_dates?dateIncludeNullBeforeAndAfter[before]=2015-04-01"
497511 Then the response status code should be 200
498512 And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
499513 And the JSON node "hydra:totalItems" should be equal to 2
500514 And the JSON node "hydra:member[0].dateIncludeNullBeforeAndAfter" should be equal to "2015-04-01T00:00:00+00:00"
501515 And the JSON node "hydra:member[1].dateIncludeNullBeforeAndAfter" should be null
502- When I send a "GET" request to "/dummy_dates?dateIncludeNullBeforeAndAfter[after]=2015-04-02"
516+ When I add "Accept" header equal to "application/ld+json"
517+ And I send a "GET" request to "/dummy_dates?dateIncludeNullBeforeAndAfter[after]=2015-04-02"
503518 Then the response status code should be 200
504519 And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
505520 And the JSON node "hydra:totalItems" should be equal to 2
0 commit comments