Sha256: d29de195878123d802c816f6ef6fbc506f1109d13366e536786477159f8e09a3

Contents?: true

Size: 606 Bytes

Versions: 18

Compression:

Stored size: 606 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

18 entries across 18 versions & 1 rubygems

Version Path
mtdevise-3.5.5 spec/support/feature_helpers.rb
mtdevise-3.5.1 spec/support/feature_helpers.rb
mtdevise-3.5.0 spec/support/feature_helpers.rb
mtdevise-3.0.4 spec/support/feature_helpers.rb
mtdevise-3.0.2 spec/support/feature_helpers.rb
mtdevise-3.0.0 spec/support/feature_helpers.rb
mtdevise-2.7.0 spec/support/feature_helpers.rb
mtdevise-2.6.6 spec/support/feature_helpers.rb
mtdevise-2.6.5 spec/support/feature_helpers.rb
mtdevise-2.5.9 spec/support/feature_helpers.rb
mtdevise-2.5.7 spec/support/feature_helpers.rb
mtdevise-2.5.5 spec/support/feature_helpers.rb
mtdevise-2.5.2 spec/support/feature_helpers.rb
mtdevise-2.5.0 spec/support/feature_helpers.rb
mtdevise-2.0.5 spec/support/feature_helpers.rb
mtdevise-2.0.2 spec/support/feature_helpers.rb
mtdevise-2.0.1 spec/support/feature_helpers.rb
mtdevise-2.0.0b spec/support/feature_helpers.rb