Sha256: 7d3278bd149e970da36449cf92c683707cf89e2996e410ce0697ebfecf374278

Contents?: true

Size: 605 Bytes

Versions: 15

Compression:

Stored size: 605 Bytes

Contents

module Features

	module SessionHelpers
		def sign_in(user = nil, pwd = nil)
			default_pwd = 'Passw0rd'
			visitor = user || create( :user, email: 'orbanbotond@gmail.com', password: default_pwd, password_confirmation: default_pwd)
			password = pwd || default_pwd
			visit mtdevise.new_user_session_path
			fill_in "user_email", with: visitor.email
			fill_in 'user_password', with: password
			click_on 'Sign-In'
		end

		def logout
			click_on 'settings_dropdown'
			sleep(2)
			click_on 'Logout'
		end

	end
end

RSpec.configure do |config|
	config.include Features::SessionHelpers, type: :feature
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mtdevise-1.8.6 spec/support/feature_helpers.rb
mtdevise-1.8.5 spec/support/feature_helpers.rb
mtdevise-1.8.0 spec/support/feature_helpers.rb
mtdevise-1.7.11 spec/support/feature_helpers.rb
mtdevise-1.7.8 spec/support/feature_helpers.rb
mtdevise-1.7.5 spec/support/feature_helpers.rb
mtdevise-1.7.1 spec/support/feature_helpers.rb
mtdevise-1.7.0 spec/support/feature_helpers.rb
mtdevise-1.6.6 spec/support/feature_helpers.rb
mtdevise-1.6.5 spec/support/feature_helpers.rb
mtdevise-1.6.3 spec/support/feature_helpers.rb
mtdevise-1.6.0 spec/support/feature_helpers.rb
mtdevise-1.5.3 spec/support/feature_helpers.rb
mtdevise-1.5.2 spec/support/feature_helpers.rb
mtdevise-1.5.0 spec/support/feature_helpers.rb