scope "/user/:display_name" do
resources :oauth_clients
end
- match '/oauth/revoke' => 'oauth#revoke', :via => :post
- match '/oauth/authorize' => 'oauth#authorize', :via => :post, :as => :authorize
+ match '/oauth/revoke' => 'oauth#revoke', :via => [:get, :post]
+ match '/oauth/authorize' => 'oauth#authorize', :via => [:get, :post], :as => :authorize
match '/oauth/token' => 'oauth#token', :via => :get, :as => :token
match '/oauth/request_token' => 'oauth#request_token', :via => :get, :as => :request_token
match '/oauth/access_token' => 'oauth#access_token', :via => :get, :as => :access_token
##
# test all routes which lead to this controller
def test_routes
+ assert_routing(
+ { :path => "/oauth/revoke", :method => :get },
+ { :controller => "oauth", :action => "revoke" }
+ )
assert_routing(
{ :path => "/oauth/revoke", :method => :post },
{ :controller => "oauth", :action => "revoke" }
)
+ assert_routing(
+ { :path => "/oauth/authorize", :method => :get },
+ { :controller => "oauth", :action => "authorize" }
+ )
assert_routing(
{ :path => "/oauth/authorize", :method => :post },
{ :controller => "oauth", :action => "authorize" }