Skip to content

Instantly share code, notes, and snippets.

@HeroicEric
Created November 28, 2011 21:24
Show Gist options
  • Save HeroicEric/1402144 to your computer and use it in GitHub Desktop.
Save HeroicEric/1402144 to your computer and use it in GitHub Desktop.
describe "GET /users" do
it "lists users if you are logged in" do
user1 = Factory(:user, name: "Elliot Stabler")
user2 = Factory(:user, name: "Olivia Benson")
visit new_user_session_path
fill_in 'user_email', with: user1.email
fill_in 'user_password', with: user1.password
click_button "Sign in"
visit users_path
page.should_have content(user1.name)
page.should_have content(user2.name)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment