Created
November 8, 2014 03:44
-
-
Save thiagoramos23/1daa683fa7e5eb5c3b49 to your computer and use it in GitHub Desktop.
login_page_object
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
| class LoginPageObject < BaseObject | |
| def visit_root | |
| visit '/' | |
| self | |
| end | |
| def login(user) | |
| fill_in I18n.t('activerecord.attributes.user.email'), with: user.email | |
| fill_in I18n.t('activerecord.attributes.user.password'), with: user.password | |
| click_on I18n.t('devise.links.sign_in') | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment