Skip to content

Commit

Permalink
failing pagination test.
Browse files Browse the repository at this point in the history
  • Loading branch information
sabman committed Mar 4, 2012
1 parent 062fc0a commit 53ea7e7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions spec/requests/user_pages_spec.rb
Expand Up @@ -4,6 +4,29 @@

subject { page }

describe "index" do
let(:user) { FactoryGirl.create(:user) }
before do
sign_in user
visit users_path
end

it { should have_selector('title', text: 'All users') }

describe "pagination" do
before(:all) { 30.times { FactoryGirl.create(:user) } }
after(:all) { User.delete_all }
it { should have_link "Next" }
it { should have_link "2" }

it "should list each user" do
User.all[0..2].each do |user|
page.should have_selector('li', text: user.name)
end
end
end
end

describe "signup page" do
before { visit signup_path }

Expand Down

0 comments on commit 53ea7e7

Please sign in to comment.