Implements login macros

This commit is contained in:
Chrisbr 2014-05-10 17:54:56 +02:00
parent d6c692962e
commit e823fc0279
2 changed files with 15 additions and 0 deletions

View file

@ -0,0 +1,12 @@
module LoginMacros
def sign_in(user)
visit new_user_session_path
fill_in 'user_email', with: user.email
fill_in 'user_password', with: user.password
find(:xpath, "//div[@id='content']//input[@name='commit']").click
expect(page.has_content?('Signed in successfully')).to be true
end
end