X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/cea6f9c4cfc7dc1bd0dc9aa71f3a39feecb98113..396f2e28dd27d514f7882c3918103b12764038de:/test/controllers/user_controller_test.rb diff --git a/test/controllers/user_controller_test.rb b/test/controllers/user_controller_test.rb index d3a654437..51f8dfd40 100644 --- a/test/controllers/user_controller_test.rb +++ b/test/controllers/user_controller_test.rb @@ -1,8 +1,6 @@ require "test_helper" class UserControllerTest < ActionController::TestCase - api_fixtures - def setup stub_hostip_requests end @@ -1124,7 +1122,7 @@ class UserControllerTest < ActionController::TestCase basic_authorization(user.email, "test") get :api_gpx_files assert_response :success - assert_equal "text/xml", response.content_type + assert_equal "application/xml", response.content_type # check the data that is returned assert_select "gpx_file[id='#{trace1.id}']", 1 do @@ -1351,8 +1349,8 @@ class UserControllerTest < ActionController::TestCase user = create(:user) moderator_user = create(:moderator_user) administrator_user = create(:administrator_user) - suspended_user = create(:user, :suspended) - ip_user = create(:user, :creation_ip => "1.2.3.4") + _suspended_user = create(:user, :suspended) + _ip_user = create(:user, :creation_ip => "1.2.3.4") # There are now 7 users - the five above, plus two extra "granters" for the # moderator_user and administrator_user @@ -1408,6 +1406,9 @@ class UserControllerTest < ActionController::TestCase session[:user] = create(:administrator_user).id + # 100 examples, an administrator, and a granter for the admin. + assert_equal 102, User.count + get :list assert_response :success assert_template :list @@ -1421,7 +1422,7 @@ class UserControllerTest < ActionController::TestCase get :list, :page => 3 assert_response :success assert_template :list - assert_select "table#user_list tr", :count => 28 + assert_select "table#user_list tr", :count => 3 end def test_list_post_confirm