]> git.openstreetmap.org Git - rails.git/blob - test/system/users_test.rb
Add frozen_string_literal comments to ruby files
[rails.git] / test / system / users_test.rb
1 # frozen_string_literal: true
2
3 require "application_system_test_case"
4
5 class UsersTest < ApplicationSystemTestCase
6   def setup
7     admin = create(:administrator_user)
8     sign_in_as(admin)
9   end
10
11   test "all users can be selected" do
12     create_list(:user, 100)
13
14     visit users_list_path
15
16     assert_css "tbody input[type=checkbox]:checked", :count => 0
17     assert_css "tbody input[type=checkbox]:not(:checked)", :count => 50
18     check "user_all"
19     assert_css "tbody input[type=checkbox]:checked", :count => 50
20     assert_css "tbody input[type=checkbox]:not(:checked)", :count => 0
21
22     click_on "Older Users", :match => :first
23
24     assert_css "tbody input[type=checkbox]:checked", :count => 0
25     assert_css "tbody input[type=checkbox]:not(:checked)", :count => 50
26     check "user_all"
27     assert_css "tbody input[type=checkbox]:checked", :count => 50
28     assert_css "tbody input[type=checkbox]:not(:checked)", :count => 0
29   end
30 end