]> git.openstreetmap.org Git - rails.git/blobdiff - test/integration/client_applications_test.rb
Use rails 5 version of redirect_back.
[rails.git] / test / integration / client_applications_test.rb
index 83325657caeec88ee914378d391ad9fc30232ddf..8c5e7078407b84371f30eaf3cea71f63b983d0f1 100644 (file)
@@ -12,7 +12,7 @@ class ClientApplicationsTest < ActionDispatch::IntegrationTest
     assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true"
     follow_redirect!
     assert_response :success
-    post "/login", "username" => user.email, "password" => "test", :referer => "/user/#{URI.encode(user.display_name)}"
+    post "/login", :params => { "username" => user.email, "password" => "test", :referer => "/user/#{URI.encode(user.display_name)}" }
     assert_response :redirect
     follow_redirect!
     assert_response :success
@@ -50,10 +50,11 @@ class ClientApplicationsTest < ActionDispatch::IntegrationTest
       end
     end
 
-    post "/user/#{URI.encode(user.display_name)}/oauth_clients", "client_application[name]" => "My New App",
-                                                                 "client_application[url]" => "http://my.new.app.org/",
-                                                                 "client_application[callback_url]" => "http://my.new.app.org/callback",
-                                                                 "client_application[support_url]" => "http://my.new.app.org/support"
+    post "/user/#{URI.encode(user.display_name)}/oauth_clients",
+         :params => { "client_application[name]" => "My New App",
+                      "client_application[url]" => "http://my.new.app.org/",
+                      "client_application[callback_url]" => "http://my.new.app.org/callback",
+                      "client_application[support_url]" => "http://my.new.app.org/support" }
     assert_response :redirect
     follow_redirect!
     assert_response :success