diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-12-05 15:11:49 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-12-05 15:11:49 +0000 |
commit | 27870ffb6d9f87aef670d632556f5ede031bb744 (patch) | |
tree | 2e0b62c66bfc2f1ede236e8d9e5e6d363748cf64 /spec/controllers/public_body_controller_spec.rb | |
parent | 00caf911d7b60cbd3dea0ec070321b5b6aa6a79d (diff) |
Fix tests relating to commit dc3c642e889f887e46873ae78967ec7c893c9c1b
Diffstat (limited to 'spec/controllers/public_body_controller_spec.rb')
-rw-r--r-- | spec/controllers/public_body_controller_spec.rb | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/spec/controllers/public_body_controller_spec.rb b/spec/controllers/public_body_controller_spec.rb index 53e6c169a..d47ea7b8d 100644 --- a/spec/controllers/public_body_controller_spec.rb +++ b/spec/controllers/public_body_controller_spec.rb @@ -68,17 +68,19 @@ describe PublicBodyController, "when listing bodies" do response.should be_success end - it "should list all bodies even when there are no translations for selected locale" do + it "should list all bodies from default locale, even when there are no translations for selected locale" do + PublicBody.with_locale(:en) do + english_only = PublicBody.new(:name => 'English only', + :short_name => 'EO', + :request_email => 'english@flourish.org', + :last_edit_editor => 'test', + :last_edit_comment => '') + english_only.save + end PublicBody.with_locale(:es) do - - spanish_only = PublicBody.new(:name => 'Spanish only', - :short_name => 'SO', - :request_email => 'spanish@flourish.org', - :last_edit_editor => 'test', - :last_edit_comment => '') - end - get :list - assigns[:public_bodies].length.should == 3 + get :list + assigns[:public_bodies].length.should == 3 + end end it "should list bodies in alphabetical order" do |