]> git.openstreetmap.org Git - rails.git/blobdiff - test/functional/oauth_controller_test.rb
Revert "Remove unused file"
[rails.git] / test / functional / oauth_controller_test.rb
index b34416be6feff29ea581590aafc89ae57562a13f..85358892e9d73d24f39af394ddf703bac51c4663 100644 (file)
@@ -5,27 +5,43 @@ class OauthControllerTest < ActionController::TestCase
   # test all routes which lead to this controller
   def test_routes
     assert_routing(
-      { :path => "/oauth/revoke" },
+      { :path => "/oauth/revoke", :method => :get },
       { :controller => "oauth", :action => "revoke" }
     )
     assert_routing(
-      { :path => "/oauth/authorize" },
+      { :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" }
     )
     assert_routing(
-      { :path => "/oauth/token" },
+      { :path => "/oauth/token", :method => :get },
       { :controller => "oauth", :action => "token" }
     )
     assert_routing(
-      { :path => "/oauth/request_token" },
+      { :path => "/oauth/request_token", :method => :get },
       { :controller => "oauth", :action => "request_token" }
     )
     assert_routing(
-      { :path => "/oauth/access_token" },
+      { :path => "/oauth/request_token", :method => :post },
+      { :controller => "oauth", :action => "request_token" }
+    )
+    assert_routing(
+      { :path => "/oauth/access_token", :method => :get },
+      { :controller => "oauth", :action => "access_token" }
+    )
+    assert_routing(
+      { :path => "/oauth/access_token", :method => :post },
       { :controller => "oauth", :action => "access_token" }
     )
     assert_routing(
-      { :path => "/oauth/test_request" },
+      { :path => "/oauth/test_request", :method => :get },
       { :controller => "oauth", :action => "test_request" }
     )
   end