Sha256: 6978addc798951f893f58d6215226f5acc7136e104a4bed3d1721abedd56b08c
Contents?: true
Size: 771 Bytes
Versions: 2
Compression:
Stored size: 771 Bytes
Contents
module Features module FeatureHelpers def sign_in_with(email, password) visit sign_in_path fill_in 'session_email', with: email fill_in 'session_password', with: password click_button 'Sign in' end def sign_out within '#header' do click_link I18n.t("layouts.application.sign_out") end end def expect_user_to_be_signed_in visit root_path expect(page).to have_link 'Sign out' end def expect_page_to_display_sign_in_error expect(page).to have_content 'Invalid id or password' end def expect_user_to_be_signed_out expect(page).to have_content 'Sign in' end end end RSpec.configure do |config| config.include Features::FeatureHelpers, type: :feature end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
authenticate-0.3.1 | spec/support/features/feature_helpers.rb |
authenticate-0.3.0 | spec/support/features/feature_helpers.rb |