]> git.openstreetmap.org Git - rails.git/blob - test/functional/oauth_clients_controller_test.rb
Update rails to 2.3.10
[rails.git] / test / functional / oauth_clients_controller_test.rb
1 require File.dirname(__FILE__) + '/../test_helper'
2
3 class OauthClientsControllerTest < ActionController::TestCase
4   ##
5   # test all routes which lead to this controller
6   def test_routes
7     assert_routing(
8       { :path => "/user/username/oauth_clients", :method => :get },
9       { :controller => "oauth_clients", :action => "index", :display_name => "username" }
10     )
11     assert_routing(
12       { :path => "/user/username/oauth_clients/new", :method => :get },
13       { :controller => "oauth_clients", :action => "new", :display_name => "username" }
14     )
15     assert_routing(
16       { :path => "/user/username/oauth_clients", :method => :post },
17       { :controller => "oauth_clients", :action => "create", :display_name => "username" }
18     )
19     assert_routing(
20       { :path => "/user/username/oauth_clients/1", :method => :get },
21       { :controller => "oauth_clients", :action => "show", :display_name => "username", :id => "1" }
22     )
23     assert_routing(
24       { :path => "/user/username/oauth_clients/1/edit", :method => :get },
25       { :controller => "oauth_clients", :action => "edit", :display_name => "username", :id => "1" }
26     )
27     assert_routing(
28       { :path => "/user/username/oauth_clients/1", :method => :put },
29       { :controller => "oauth_clients", :action => "update", :display_name => "username", :id => "1" }
30     )
31     assert_routing(
32       { :path => "/user/username/oauth_clients/1", :method => :delete },
33       { :controller => "oauth_clients", :action => "destroy", :display_name => "username", :id => "1" }
34     )
35   end
36 end