- 'test/controllers/notes_controller_test.rb'
- 'test/controllers/traces_controller_test.rb'
- 'test/controllers/user_blocks_controller_test.rb'
+ - 'test/system/users_test.rb'
# Offense count: 635
# This cop supports safe autocorrection (--autocorrect).
//= require leaflet.locatecontrol/src/L.Control.Locate
+(function () {
+ $(document).on("change", "#user_all", function () {
+ $("#user_list input[type=checkbox]").prop("checked", $("#user_all").prop("checked"));
+ });
+}());
+
$(document).ready(function () {
var defaultHomeZoom = 12;
var map, marker, deleted_lat, deleted_lon;
enableAuth();
}
- $("#user_all").change(function () {
- $("#user_list input[type=checkbox]").prop("checked", $("#user_all").prop("checked"));
- });
-
$("#content.user_confirm").each(function () {
$(this).hide();
$(this).find("#confirm").submit();
--- /dev/null
+require "application_system_test_case"
+
+class UsersTest < ApplicationSystemTestCase
+ def setup
+ admin = create(:administrator_user)
+ sign_in_as(admin)
+ end
+
+ test "all users can be selected" do
+ create_list(:user, 100)
+
+ visit users_path
+
+ assert_css "tbody input[type=checkbox]:checked", :count => 0
+ assert_css "tbody input[type=checkbox]:not(:checked)", :count => 50
+ check "user_all"
+ assert_css "tbody input[type=checkbox]:checked", :count => 50
+ assert_css "tbody input[type=checkbox]:not(:checked)", :count => 0
+
+ click_on "Older Users", :match => :first
+
+ assert_css "tbody input[type=checkbox]:checked", :count => 0
+ assert_css "tbody input[type=checkbox]:not(:checked)", :count => 50
+ check "user_all"
+ assert_css "tbody input[type=checkbox]:checked", :count => 50
+ assert_css "tbody input[type=checkbox]:not(:checked)", :count => 0
+ end
+end