X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d8399d3e188f2786c7a90661b7c806eb1ee7612b..ef7f3d800cbdd49b692df10d312e5fd880e2e938:/test/integration/user_roles_test.rb?ds=sidebyside diff --git a/test/integration/user_roles_test.rb b/test/integration/user_roles_test.rb index 3d2fab4d0..cbd0dbe80 100644 --- a/test/integration/user_roles_test.rb +++ b/test/integration/user_roles_test.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/../test_helper' +require 'test_helper' class UserRolesTest < ActionDispatch::IntegrationTest fixtures :users, :user_roles @@ -16,7 +16,7 @@ class UserRolesTest < ActionDispatch::IntegrationTest check_fail(:revoke, :administrator_user, :moderator) end -private + private def check_fail(action, user, role) get '/login' @@ -24,7 +24,7 @@ private assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true" follow_redirect! assert_response :success - post '/login', {'username' => users(user).email, 'password' => "test", :referer => "/"} + post '/login', 'username' => users(user).email, 'password' => "test", :referer => "/" assert_response :redirect follow_redirect! assert_response :success @@ -41,7 +41,7 @@ private assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true" follow_redirect! assert_response :success - post '/login', {'username' => users(user).email, 'password' => "test", :referer => "/"} + post '/login', 'username' => users(user).email, 'password' => "test", :referer => "/" assert_response :redirect follow_redirect! assert_response :success