Skip to content

Commit

Permalink
Added a test for browse user by letter pagination.
Browse files Browse the repository at this point in the history
  • Loading branch information
LindseyB committed Mar 31, 2011
1 parent 88ea4a9 commit 834659b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/rstatus_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,20 @@ def test_users_browse_paginates
assert_match "Next", page.body
end

def test_users_browse_by_letter_paginates
visit "/users"

u2 = Factory(:user)
49.times do
u2 = Factory(:user)
end

click_link "U"
click_link "next_button"

assert_match u2.username, page.body
end

def test_users_browse_shows_latest_users
aardvark = Factory(:user, :username => "aardvark", :created_at => Date.new(2010, 10, 23))
zebra = Factory(:user, :username => "zebra", :created_at => Date.new(2011, 10, 24))
Expand Down

0 comments on commit 834659b

Please sign in to comment.