diff options
Diffstat (limited to 'spec/controllers/public_body_controller_spec.rb')
-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 |