aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/user_controller_spec.rb5
-rw-r--r--spec/models/outgoing_mailer_spec.rb2
-rw-r--r--spec/models/xapian_spec.rb1
-rw-r--r--spec/spec_helper.rb10
4 files changed, 10 insertions, 8 deletions
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb
index 90f90860a..81da94e67 100644
--- a/spec/controllers/user_controller_spec.rb
+++ b/spec/controllers/user_controller_spec.rb
@@ -125,7 +125,7 @@ describe UserController, "when signing in" do
# check is right confirmation URL
mail_token.should == post_redirect.email_token
- params_from(:get, mail_path).should == { :controller => 'user', :action => 'confirm', :email_token => mail_token }
+ params_from(:get, mail_path).should == { :controller => 'user', :action => 'confirm', :email_token => mail_token, :locale => "en" }
# check confirmation URL works
session[:user_id].should be_nil
@@ -421,7 +421,8 @@ describe UserController, "when changing email address" do
"old_email"=>"bob@localhost",
"new_email"=>"newbob@localhost",
"password"=>"jonespassword"},
- "controller"=>"user"}
+ "controller"=>"user",
+ "locale"=>"en"}
post :signchangeemail, post_redirect.post_params
response.should redirect_to(:controller => 'user', :action => 'show', :url_name => 'bob_smith')
diff --git a/spec/models/outgoing_mailer_spec.rb b/spec/models/outgoing_mailer_spec.rb
index e86f5635c..71a46f8f8 100644
--- a/spec/models/outgoing_mailer_spec.rb
+++ b/spec/models/outgoing_mailer_spec.rb
@@ -24,7 +24,7 @@ describe OutgoingMailer, " when working out follow up addresses" do
# check the basic entry in the fixture is fine
OutgoingMailer.name_and_email_for_followup(ir, im).should == "foiperson@localhost"
- OutgoingMailer.name_for_followup(ir, im).should == "The Geraldine Quango"
+ OutgoingMailer.name_for_followup(ir, im).should == "Geraldine Quango"
OutgoingMailer.email_for_followup(ir, im).should == "foiperson@localhost"
end
diff --git a/spec/models/xapian_spec.rb b/spec/models/xapian_spec.rb
index 36836d95b..00a88be99 100644
--- a/spec/models/xapian_spec.rb
+++ b/spec/models/xapian_spec.rb
@@ -302,7 +302,6 @@ describe PublicBody, " when indexing authorities by tag" do
xapian_object = InfoRequest.full_search([PublicBody], "tag:mice", 'created_at', true, nil, 100, 1)
xapian_object.results.size.should == 1
xapian_object.results[0][:model] == public_bodies(:geraldine_public_body)
-
xapian_object = InfoRequest.full_search([PublicBody], "tag:mice:3", 'created_at', true, nil, 100, 1)
xapian_object.results.size.should == 1
xapian_object.results[0][:model] == public_bodies(:geraldine_public_body)
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index c6e894584..f0f50d61e 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,7 +1,6 @@
# This file is copied to ~/spec when you run 'ruby script/generate rspec'
# from the project root directory.
ENV["RAILS_ENV"] ||= 'test'
-RAILS_ENV = "test"
require File.expand_path(File.join(File.dirname(__FILE__),'..','config','environment'))
require 'spec/autorun'
require 'spec/rails'
@@ -17,8 +16,6 @@ Spec::Runner.configure do |config|
# If you're not using ActiveRecord you should remove these
# lines, delete config/database.yml and disable :active_record
# in your config/boot.rb
- config.use_transactional_fixtures = true
- config.use_instantiated_fixtures = false
config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
# == Fixtures
@@ -118,6 +115,11 @@ if $tempfilecount.nil?
def process(action, parameters = nil, session = nil, flash = nil, http_method = 'GET')
# Call original process function
+ if parameters.nil?
+ parameters = {:locale => "en"}
+ elsif not parameters.has_key?(:locale)
+ parameters[:locale] = "en"
+ end
self.original_process(action, parameters, session, flash, http_method)
# XXX Is there a better way to check this than calling a private method?
@@ -133,4 +135,4 @@ if $tempfilecount.nil?
else
puts "WARNING: HTML validation script " + $html_validation_script + " not found"
end
-end \ No newline at end of file
+end