aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/user_controller_spec.rb
diff options
context:
space:
mode:
authorFrancis Irving <francis@mysociety.org>2010-03-20 18:45:15 +0000
committerFrancis Irving <francis@mysociety.org>2010-03-20 18:45:15 +0000
commit5b35b7768baa4df6e96f1a147c247691497f0a3e (patch)
treed1961c9afcd982b81fef085ba3bf4d40d5014a38 /spec/controllers/user_controller_spec.rb
parent062849c75d5c7b4b83772a212a8a871c5d8433f7 (diff)
Allow emails case insensitively.
Diffstat (limited to 'spec/controllers/user_controller_spec.rb')
-rw-r--r--spec/controllers/user_controller_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb
index 2bfb35240..193cf476c 100644
--- a/spec/controllers/user_controller_spec.rb
+++ b/spec/controllers/user_controller_spec.rb
@@ -346,6 +346,18 @@ describe UserController, "when changing email address" do
deliveries.size.should == 0
end
+ it "should work even if the old email had a case difference" do
+ @user = users(:bob_smith_user)
+ session[:user_id] = @user.id
+
+ post :signchangeemail, { :signchangeemail => { :old_email => 'BOB@localhost',
+ :password => 'jonespassword', :new_email => 'newbob@localhost' },
+ :submitted_signchangeemail_do => 1
+ }
+
+ response.should render_template('signchangeemail_confirm')
+ end
+
it "should send confirmation email if you get all the details right" do
@user = users(:bob_smith_user)
session[:user_id] = @user.id