Permalink
Browse files

Some more generation tests

  • Loading branch information...
1 parent 43e0bc1 commit 07da304ff84dca9a286005630cd3340f51384465 @josh josh committed Oct 28, 2009
Showing with 4 additions and 1 deletion.
  1. +4 −1 actionpack/test/dispatch/routing_test.rb
@@ -116,18 +116,21 @@ def test_logout
assert_equal 'sessions#destroy', @response.body
assert_equal '/logout', logout_path
+ assert_equal '/logout', url_for(:controller => 'sessions', :action => 'destroy', :only_path => true)
end
end
def test_login
with_test_routes do
get '/login'
assert_equal 'sessions#new', @response.body
+ assert_equal '/login', login_path
post '/login'
assert_equal 'sessions#create', @response.body
- assert_equal '/login', login_path
+ assert_equal '/login', url_for(:controller => 'sessions', :action => 'create', :only_path => true)
+ assert_equal '/login', url_for(:controller => 'sessions', :action => 'new', :only_path => true)
end
end

0 comments on commit 07da304

Please sign in to comment.