From 8905fecb565acde9dcf99ce4b351bb5ad237e136 Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Wed, 30 May 2012 16:01:46 +0100 Subject: Make the logic that tells you about other countries' Alavetelis prefer the browser language; and make the tests pass. --- spec/controllers/services_controller_spec.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'spec/controllers/services_controller_spec.rb') diff --git a/spec/controllers/services_controller_spec.rb b/spec/controllers/services_controller_spec.rb index 1bafd0c8f..2be382258 100644 --- a/spec/controllers/services_controller_spec.rb +++ b/spec/controllers/services_controller_spec.rb @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe ServicesController, "when using web services" do @@ -16,15 +17,16 @@ describe ServicesController, "when using web services" do config['ISO_COUNTRY_CODE'] = "DE" controller.stub!(:country_from_ip).and_return('ZZ') get :other_country_message - response.body.should match(/outside Germany/) + response.body.should match(/outside Deutschland/) end it "should show link to other FOI website when not in the deployed country" do config = MySociety::Config.load_default() config['ISO_COUNTRY_CODE'] = "ZZ" - controller.stub!(:country_from_ip).and_return('DE') + controller.stub!(:country_from_ip).and_return('ES') + request.env['HTTP_ACCEPT_LANGUAGE'] = "es" get :other_country_message - response.body.should match(/within Germany/) + response.body.should match(/Puede hacer solicitudes de información en España/) end -- cgit v1.2.3