mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
Merge pull request #2997 from parallel588/master
fixed store location with bad URL
This commit is contained in:
@@ -193,6 +193,12 @@ class ControllerAuthenticatableTest < ActionController::TestCase
|
||||
assert_equal "/foo.bar", @controller.stored_location_for(:user)
|
||||
end
|
||||
|
||||
test 'store bad location for stores a location to redirect back to' do
|
||||
assert_nil @controller.stored_location_for(:user)
|
||||
@controller.store_location_for(:user, "/foo.bar\">Carry")
|
||||
assert_nil @controller.stored_location_for(:user)
|
||||
end
|
||||
|
||||
test 'store location for accepts a resource as argument' do
|
||||
@controller.store_location_for(User.new, "/foo.bar")
|
||||
assert_equal "/foo.bar", @controller.stored_location_for(User.new)
|
||||
|
||||
Reference in New Issue
Block a user