mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-27 04:18:49 +01:00
fix #1325 by applying the patch of Dan Rice. Thanks Dan!
Also add a test to catch regessions
This commit is contained in:
parent
29c5103a98
commit
1cdf6c8b8e
3 changed files with 7 additions and 2 deletions
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
###############
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue