Sha256: 23f0be1434a793983406ef8f2e3176048a4115fb79f29b15eafbb642bab0fb71
Contents?: true
Size: 972 Bytes
Versions: 9
Compression:
Stored size: 972 Bytes
Contents
module Ecm::UserArea module SpecHelpers module Feature def sign_up(user_attributes) visit "/#{I18n.locale}/#{I18n.t('routes.ecm_user_area_engine')}/#{I18n.t('routes.current_user')}/new" within('#new_user') do fill_in 'user[email]', with: user_attributes[:email] fill_in 'user[password]', with: user_attributes[:password] fill_in 'user[password_confirmation]', with: user_attributes[:password] submit(Ecm::UserArea::User.model_name.human, :create) end end def sign_in(user) visit "/#{I18n.locale}/#{I18n.t('routes.ecm_user_area_engine')}/#{I18n.t('routes.user_session')}/new" within('#new_user_session') do fill_in 'user_session[email]', with: user.email fill_in 'user_session[password]', with: user.password click_on I18n.t('helpers.submit.user_session.create') end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems