Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,10 @@ def self.matches?(request) | |
post :reset | ||
|
||
resource :info | ||
|
||
member do | ||
get :crush | ||
end | ||
end | ||
|
||
match 'account/logout' => redirect("/logout"), :as => :logout_redirect | ||
|
@@ -352,6 +356,15 @@ def test_session_info_nested_singleton_resource | |
end | ||
end | ||
|
||
def test_member_on_resource | ||
with_test_routes do | ||
get '/session/1/crush' | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
josevalim
Contributor
|
||
assert_equal 'sessions#crush', @response.body | ||
|
||
assert_equal '/session/1/crush', crush_session_path(1) | ||
end | ||
end | ||
|
||
def test_redirect_modulo | ||
with_test_routes do | ||
get '/account/modulo/name' | ||
|
This isn't right - a member action on a singleton resource shouldn't have an id. It should be /session/crush.