Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Changing the data/test so we can reproduce the problem
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-gravgaard committed Aug 6, 2014
1 parent 564bdc4 commit 3aba7b6
Show file tree
Hide file tree
Showing 2 changed files with 132 additions and 9 deletions.
133 changes: 128 additions & 5 deletions features/fixtures/subgroup.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"data": [
[
{
"_day_start_at": "2014-03-01T00:00:00+00:00",
"_hour_start_at": "2014-03-01T00:00:00+00:00",
Expand All @@ -13,7 +12,131 @@
"organisation_acronym": "1_953966",
"period": "month",
"total_gov_uk_dept_and_policy_comment_count": 3624
},
{
"_day_start_at": "2014-03-01T00:00:00+00:00",
"_hour_start_at": "2014-03-01T00:00:00+00:00",
"_id": "201403_1_977238",
"_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.434000+00:00",
"_week_start_at": "2014-02-24T00:00:00+00:00",
"comment_count": 1,
"organisation_acronym": "1_977238",
"period": "month",
"total_gov_uk_dept_and_policy_comment_count": 3624
},
{
"_day_start_at": "2014-03-01T00:00:00+00:00",
"_hour_start_at": "2014-03-01T00:00:00+00:00",
"_id": "201403_1_999804",
"_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.435000+00:00",
"_week_start_at": "2014-02-24T00:00:00+00:00",
"comment_count": 1,
"organisation_acronym": "1_999804",
"period": "month",
"total_gov_uk_dept_and_policy_comment_count": 3624
},
{
"_day_start_at": "2014-03-01T00:00:00+00:00",
"_hour_start_at": "2014-03-01T00:00:00+00:00",
"_id": "201403_1e309",
"_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.423000+00:00",
"_week_start_at": "2014-02-24T00:00:00+00:00",
"comment_count": 2,
"organisation_acronym": "1e309",
"period": "month",
"total_gov_uk_dept_and_policy_comment_count": 3624
},
{
"_day_start_at": "2014-03-01T00:00:00+00:00",
"_hour_start_at": "2014-03-01T00:00:00+00:00",
"_id": "201403_268435455",
"_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.435000+00:00",
"_week_start_at": "2014-02-24T00:00:00+00:00",
"comment_count": 1,
"organisation_acronym": "268435455",
"period": "month",
"total_gov_uk_dept_and_policy_comment_count": 3624
},
{
"_day_start_at": "2014-03-01T00:00:00+00:00",
"_hour_start_at": "2014-03-01T00:00:00+00:00",
"_id": "201403_8404",
"_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.435000+00:00",
"_week_start_at": "2014-02-24T00:00:00+00:00",
"comment_count": 1,
"organisation_acronym": "8404",
"period": "month",
"total_gov_uk_dept_and_policy_comment_count": 3624
},
{
"_day_start_at": "2014-03-01T00:00:00+00:00",
"_hour_start_at": "2014-03-01T00:00:00+00:00",
"_id": "201403_88952634",
"_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.436000+00:00",
"_week_start_at": "2014-02-24T00:00:00+00:00",
"comment_count": 34,
"organisation_acronym": "88952634",
"period": "month",
"total_gov_uk_dept_and_policy_comment_count": 3624
},
{
"_day_start_at": "2014-03-01T00:00:00+00:00",
"_hour_start_at": "2014-03-01T00:00:00+00:00",
"_id": "201403_88952634s3",
"_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.437000+00:00",
"_week_start_at": "2014-02-24T00:00:00+00:00",
"comment_count": 1,
"organisation_acronym": "88952634s3",
"period": "month",
"total_gov_uk_dept_and_policy_comment_count": 3624
},
{
"_day_start_at": "2014-03-01T00:00:00+00:00",
"_hour_start_at": "2014-03-01T00:00:00+00:00",
"_id": "201403_acaf",
"_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.437000+00:00",
"_week_start_at": "2014-02-24T00:00:00+00:00",
"comment_count": 1,
"organisation_acronym": "acaf",
"period": "month",
"total_gov_uk_dept_and_policy_comment_count": 3624
},
{
"_day_start_at": "2014-03-01T00:00:00+00:00",
"_hour_start_at": "2014-03-01T00:00:00+00:00",
"_id": "201403_acas",
"_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.437000+00:00",
"_week_start_at": "2014-02-24T00:00:00+00:00",
"comment_count": 1,
"organisation_acronym": "acas",
"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."
}
]
8 changes: 4 additions & 4 deletions features/read_api/group.feature
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ 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

Scenario: subgroups should contain _count
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"
when I go to "/weekly?limit=1&period=month&group_by=organisation_acronym&filter_by=organisation_acronym%3Aacas&collect=comment_count%3Asum&duration=13"
then I should get back a status of "200"
and the JSON should have "0" results
and the "1st" result should have "values" with item "{"_end_at": "2013-04-01T00:00:00+00:00", "_count": 0, "_start_at": "2013-03-01T00:00:00+00:00", "comment_count:sum": null}"


Scenario: grouping data by a period and field representing period is invalid
Expand Down

0 comments on commit 3aba7b6

Please sign in to comment.