aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/public_body_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/public_body_controller_spec.rb')
-rw-r--r--spec/controllers/public_body_controller_spec.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/controllers/public_body_controller_spec.rb b/spec/controllers/public_body_controller_spec.rb
index 4e1841164..2b921b488 100644
--- a/spec/controllers/public_body_controller_spec.rb
+++ b/spec/controllers/public_body_controller_spec.rb
@@ -78,7 +78,8 @@ describe PublicBodyController, "when listing bodies" do
response.should be_success
end
- it "should list all bodies from default locale, even when there are no translations for selected locale" do
+ it "if fallback is requested, should list all bodies from default locale, even when there are no translations for selected locale" do
+ AlaveteliConfiguration.stub!(:public_body_list_fallback_to_default_locale).and_return(true)
I18n.with_locale(:en) do
@english_only = PublicBody.new(:name => 'English only',
:short_name => 'EO',
@@ -96,6 +97,12 @@ describe PublicBodyController, "when listing bodies" do
response.should contain('El Department for Humpadinking')
end
+ it 'should not show the internal admin authority' do
+ PublicBody.internal_admin_body
+ get :list, {:locale => 'en'}
+ response.should_not contain('Internal admin authority')
+ end
+
it 'should show public body names in the selected locale language if present for a locale with underscores' do
AlaveteliLocalization.set_locales('he_IL en', 'en')
get :list, {:locale => 'he_IL'}