aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/public_body_controller_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-01-24 10:36:38 +0000
committerLouise Crow <louise.crow@gmail.com>2014-01-24 10:36:38 +0000
commit1445541f487fe22ec44b71607be3300319338d0a (patch)
tree5c9ed659c968f092317de6bab59a712e2584ca66 /spec/controllers/public_body_controller_spec.rb
parent4eb8432dedc8b521086cdf163ebe5d373396d39a (diff)
parentb0a939a4d44077b4602176042ff4432b790561ad (diff)
Merge branch 'release/0.16'0.16
Diffstat (limited to 'spec/controllers/public_body_controller_spec.rb')
-rw-r--r--spec/controllers/public_body_controller_spec.rb14
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