diff options
author | Mark Longair <mhl@pobox.com> | 2013-11-19 11:59:52 +0000 |
---|---|---|
committer | Mark Longair <mhl@pobox.com> | 2013-11-19 11:59:52 +0000 |
commit | 231657cdc503b95b5075ff11e018ca9c63f3e59c (patch) | |
tree | 9b9f45acdc0b5b34c4ff93dc7c070ad4a6f72b81 /spec/controllers | |
parent | 95937d77a4cd7301f932e0f893af1efb37524147 (diff) | |
parent | c1ee22fe8df92b03573a03e13f6fd692c9074dd0 (diff) |
Merge branch 'all-authorities-reduce-memory' into rails-3-develop
This has already been cherry-picked into the wdtk branch, but
it should also be merged into rails-3-develop
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/public_body_controller_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/controllers/public_body_controller_spec.rb b/spec/controllers/public_body_controller_spec.rb index 0e0b0a575..63989baaa 100644 --- a/spec/controllers/public_body_controller_spec.rb +++ b/spec/controllers/public_body_controller_spec.rb @@ -275,6 +275,20 @@ describe PublicBodyController, "when showing JSON version for API" do end +describe PublicBodyController, "when asked to export public bodies as CSV" do + + it "should return a valid CSV file with the right number of rows" do + get :list_all_csv + all_data = CSV.parse response.body + all_data.length.should == 8 + # Check that the header has the right number of columns: + all_data[0].length.should == 11 + # And an actual line of data: + all_data[1].length.should == 11 + end + +end + describe PublicBodyController, "when showing public body statistics" do it "should render the right template with the right data" do |