18 lines
388 B
Ruby
18 lines
388 B
Ruby
|
require "test_helper"
|
||
|
|
||
|
class UsersIndexTest < ActionDispatch::IntegrationTest
|
||
|
def setup
|
||
|
@user = users(:michael)
|
||
|
end
|
||
|
|
||
|
test "index including pagination" do
|
||
|
log_in_as(@user)
|
||
|
get users_path
|
||
|
assert_template "users/index"
|
||
|
assert_select "ul.pagination"
|
||
|
User.page(1).each do |user|
|
||
|
assert_select "a[href=?]", user_path(user), text: user.name
|
||
|
end
|
||
|
end
|
||
|
end
|