diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-27 09:36:02 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-27 09:36:02 +0000 |
commit | 347a24ccfe0881b494044778cae64809d3e001c0 (patch) | |
tree | d9cc2cad0d41804fa8c43dfc5189a27d454fae14 /spec/controllers/public_body_controller_spec.rb | |
parent | 5d77eb0b4580bf6fb13e2fca2e9469b84f8315ff (diff) |
More test data and a new test
This is a test for what I thought issue #370 might be. However this
test is passing, so it isn’t that.
Diffstat (limited to 'spec/controllers/public_body_controller_spec.rb')
-rw-r--r-- | spec/controllers/public_body_controller_spec.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/controllers/public_body_controller_spec.rb b/spec/controllers/public_body_controller_spec.rb index 4b657849a..bd4e625ca 100644 --- a/spec/controllers/public_body_controller_spec.rb +++ b/spec/controllers/public_body_controller_spec.rb @@ -105,11 +105,14 @@ describe PublicBodyController, "when listing bodies" do end it "should list bodies in alphabetical order" do + # Note that they are alphabetised by localised name get :list response.should render_template('list') - assigns[:public_bodies].should == PublicBody.all(:order => "name", :conditions => "id <> #{PublicBody.internal_admin_body.id}") + assigns[:public_bodies].should == PublicBody.all( + :conditions => "id <> #{PublicBody.internal_admin_body.id}", + :order => "(select name from public_body_translations where public_body_id=public_bodies.id and locale='en')") assigns[:tag].should == "all" assigns[:description].should == "" end |