diff --git a/features/fixtures/subgroup.json b/features/fixtures/subgroup.json new file mode 100644 index 00000000..b271094b --- /dev/null +++ b/features/fixtures/subgroup.json @@ -0,0 +1,19 @@ +{ + "data": [ + { + "_day_start_at": "2014-03-01T00:00:00+00:00", + "_hour_start_at": "2014-03-01T00:00:00+00:00", + "_id": "201403_1_953966", + "_month_start_at": "2014-03-01T00:00:00+00:00", + "_quarter_start_at": "2014-01-01T00:00:00+00:00", + "_timestamp": "2014-03-01T00:00:00+00:00", + "_updated_at": "2014-04-16T10:59:50.431000+00:00", + "_week_start_at": "2014-02-24T00:00:00+00:00", + "comment_count": 1, + "organisation_acronym": "1_953966", + "period": "month", + "total_gov_uk_dept_and_policy_comment_count": 3624 + } + ], + "warning": "Warning: This data-set is unpublished. Data may be subject to change or be inaccurate." +} diff --git a/features/read_api/group.feature b/features/read_api/group.feature index 58a47793..d16ea80e 100644 --- a/features/read_api/group.feature +++ b/features/read_api/group.feature @@ -75,6 +75,13 @@ Feature: grouping queries for read api then I should get back a status of "200" and the JSON should have "0" results + @broke_as_shit + Scenario: I have a problem with my read API + Given "subgroup.json" is in "weekly" data_set + when I go to "/weekly?limit=1&period=month&group_by=organisation_acronym&filter_by=organisation_acronym%3Aago&collect=comment_count%3Asum&duration=13" + then I should get back a status of "200" + and the JSON should have "0" results + Scenario: grouping data by a period and field representing period is invalid Given "licensing.json" is in "weekly" data_set