Created
November 28, 2011 21:24
-
-
Save HeroicEric/1402144 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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