fix #1325 by applying the patch of Dan Rice. Thanks Dan!

Also add a test to catch regessions
This commit is contained in:
Reinier Balt 2012-08-25 17:18:22 +02:00
parent 29c5103a98
commit 1cdf6c8b8e
3 changed files with 7 additions and 2 deletions

View file

@ -158,7 +158,7 @@ module LoginSystem
def access_denied
respond_to do |format|
format.html { redirect_to login_path }
format.m { redirect_to formatted_login_path(:format => 'm') }
format.m { redirect_to login_path(:format => 'm') }
format.js { render :partial => 'login/redirect_to_login' }
format.xml { basic_auth_denied }
format.rss { basic_auth_denied }

View file

@ -45,7 +45,7 @@ class LoginControllerTest < ActionController::TestCase
get :login
assert_redirected_to signup_url
end
def test_logout
login_as :admin_user
get :logout

View file

@ -535,6 +535,11 @@ class TodosControllerTest < ActionController::TestCase
assert_equal 11, assigns['down_count']
end
def test_mobile_redirect_to_login
get :index, { :format => "m" }
assert_redirected_to login_url(:format => "m")
end
###############
# mobile create
###############