From b198fe678622b194ce93a531441490fce411b8f3 Mon Sep 17 00:00:00 2001 From: Francis Irving Date: Tue, 22 Dec 2009 15:47:34 +0000 Subject: Fix remember me. --- spec/controllers/user_controller_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'spec/controllers/user_controller_spec.rb') diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb index f6f3c16ca..83abbfe3d 100644 --- a/spec/controllers/user_controller_spec.rb +++ b/spec/controllers/user_controller_spec.rb @@ -84,6 +84,15 @@ describe UserController, "when signing in" do response.should_not send_email end +# No idea how to test this in the test framework :( +# it "should have set a long lived cookie if they picked remember me, session cookie if they didn't" do +# get :signin, :r => "/list" +# response.should render_template('sign') +# post :signin, { :user_signin => { :email => 'bob@localhost', :password => 'jonespassword' } } +# session[:user_id].should == users(:bob_smith_user).id +# raise session.options.to_yaml # check cookie lasts a month +# end + it "should ask you to confirm your email if it isn't confirmed, after log in" do get :signin, :r => "/list" response.should render_template('sign') -- cgit v1.2.3