Created
January 22, 2012 22:10
-
-
Save vladvinnikov/1659093 to your computer and use it in GitHub Desktop.
Authlogic rspec webrat
This file contains hidden or 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
| require "authlogic/test_case" | |
| def execute_login | |
| activate_authlogic | |
| @user = Factory.create(:user, :confirmation_ok => true) | |
| @user_session = UserSession.create(@user) | |
| end | |
| before(:all) do | |
| 09. | |
| activate_authlogic | |
| 10. | |
| @user = User.create!(:name => "foo bar", :email => "[email protected]", :password => "foobar", :password_confirmation => "foobar") | |
| 11. | |
| visit admin_posts_url | |
| 12. | |
| fill_in "user_session_email",:with => "[email protected]" | |
| 13. | |
| fill_in "user_session_password",:with => "foobar" | |
| 14. | |
| click_button "Enter" | |
| 15. | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment