aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/user_controller_spec.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-09-03 11:44:34 +0100
committerSeb Bacon <seb.bacon@gmail.com>2011-09-03 11:44:47 +0100
commit204e5c3a739a2bedf927b2f6aa82c373731bbda8 (patch)
tree669931c42034d41329418f1ead3dc8ad6bcf9881 /spec/controllers/user_controller_spec.rb
parenta79be3df0fddf2763376033cf731f0efbc915fcf (diff)
Store user's locale against profile, so we can send them localised track emails. Also internationalize more strings at the same time. Fixes #163.
Diffstat (limited to 'spec/controllers/user_controller_spec.rb')
-rw-r--r--spec/controllers/user_controller_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb
index e373c8df6..0ba542630 100644
--- a/spec/controllers/user_controller_spec.rb
+++ b/spec/controllers/user_controller_spec.rb
@@ -178,6 +178,19 @@ describe UserController, "when signing up" do
deliveries[0].body.should include("not reveal your email")
end
+ it "should send confirmation mail in other languages or different locales" do
+ session[:locale] = "es"
+ post :signup, {:user_signup => { :email => 'new@localhost', :name => 'New Person',
+ :password => 'sillypassword', :password_confirmation => 'sillypassword',
+ }
+ }
+ response.should render_template('confirm')
+
+ deliveries = ActionMailer::Base.deliveries
+ deliveries.size.should == 1
+ deliveries[0].body.should include("No revelaremos su dirección de correo")
+ end
+
it "should send special 'already signed up' mail if you fill the form in with existing registered email " do
post :signup, { :user_signup => { :email => 'silly@localhost', :name => 'New Person',
:password => 'sillypassword', :password_confirmation => 'sillypassword' }