Sha256: 1eef87882770f4c88d624a3332d82e8ca3153679e8d42d7d123f40c13cd2efb2

Contents?: true

Size: 438 Bytes

Versions: 13

Compression:

Stored size: 438 Bytes

Contents

# spec/support/features/session_helpers.rb
module Features
  module SessionHelpers
    def sign_in(who = :user)
      logout
      user = who.is_a?(User) ? who : FactoryGirl.build(:user).tap { |u| u.save! }
      visit new_user_session_path
      fill_in 'Email', with: user.email
      fill_in 'Password', with: user.password
      click_button 'Log in'
      expect(page).not_to have_text 'Invalid email or password.'
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
sufia-6.2.0 spec/support/features/session_helpers.rb
sufia-6.1.0 spec/support/features/session_helpers.rb
sufia-5.0.0 spec/support/features/session_helpers.rb
sufia-6.0.0 spec/support/features/session_helpers.rb
sufia-6.0.0.rc4 spec/support/features/session_helpers.rb
sufia-6.0.0.rc3 spec/support/features/session_helpers.rb
sufia-5.0.0.rc1 spec/support/features/session_helpers.rb
sufia-6.0.0.rc2 spec/support/features/session_helpers.rb
sufia-6.0.0.rc1 spec/support/features/session_helpers.rb
sufia-4.3.1 spec/support/features/session_helpers.rb
sufia-6.0.0.beta1 spec/support/features/session_helpers.rb
sufia-4.2.0 spec/support/features/session_helpers.rb
sufia-4.1.0 spec/support/features/session_helpers.rb