aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/user_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/user_controller_spec.rb')
-rw-r--r--spec/controllers/user_controller_spec.rb19
1 files changed, 0 insertions, 19 deletions
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb
index b09594b9c..fe95aa31c 100644
--- a/spec/controllers/user_controller_spec.rb
+++ b/spec/controllers/user_controller_spec.rb
@@ -105,8 +105,6 @@ describe UserController, "when signing in" do
end
it "should log in when you give right email/password, and redirect to where you were" do
- RoutingFilter.active = false
-
get :signin, :r => "/list"
response.should render_template('sign')
post_redirect = get_last_postredirect
@@ -117,13 +115,9 @@ describe UserController, "when signing in" do
# response doesn't contain /en/ but redirect_to does...
response.should redirect_to(:controller => 'request', :action => 'list', :post_redirect => 1)
ActionMailer::Base.deliveries.should be_empty
-
- RoutingFilter.active = true
end
it "should not log you in if you use an invalid PostRedirect token, and shouldn't give 500 error either" do
- RoutingFilter.active = false
-
post_redirect = "something invalid"
lambda {
post :signin, { :user_signin => { :email => 'bob@localhost', :password => 'jonespassword' },
@@ -134,8 +128,6 @@ describe UserController, "when signing in" do
:token => post_redirect }
response.should render_template('sign')
assigns[:post_redirect].should == nil
-
- RoutingFilter.active = true
end
# No idea how to test this in the test framework :(
@@ -159,8 +151,6 @@ describe UserController, "when signing in" do
end
it "should confirm your email, log you in and redirect you to where you were after you click an email link" do
- RoutingFilter.active = false
-
get :signin, :r => "/list"
post_redirect = get_last_postredirect
@@ -186,13 +176,9 @@ describe UserController, "when signing in" do
get :confirm, :email_token => post_redirect.email_token
session[:user_id].should == users(:unconfirmed_user).id
response.should redirect_to(:controller => 'request', :action => 'list', :post_redirect => 1)
-
- RoutingFilter.active = true
end
it "should keep you logged in if you click a confirmation link and are already logged in as an admin" do
- RoutingFilter.active = false
-
get :signin, :r => "/list"
post_redirect = get_last_postredirect
@@ -223,7 +209,6 @@ describe UserController, "when signing in" do
# And the redirect should still work, of course
response.should redirect_to(:controller => 'request', :action => 'list', :post_redirect => 1)
- RoutingFilter.active = true
end
end
@@ -301,14 +286,10 @@ describe UserController, "when signing out" do
end
it "should log you out and redirect you to where you were" do
- RoutingFilter.active = false
-
session[:user_id] = users(:bob_smith_user).id
get :signout, :r => '/list'
session[:user_id].should be_nil
response.should redirect_to(:controller => 'request', :action => 'list')
-
- RoutingFilter.active = true
end
end