Sha256: 1e2dc2cedb9290ee8216d43fca38ebbb8ed7059dc720093325175b382bc95f4f
Contents?: true
Size: 577 Bytes
Versions: 6
Compression:
Stored size: 577 Bytes
Contents
module ControllerHelper def sign_in(user = create_user('not_encrypted')) allow(warden).to receive(:authenticated?).with(:user).and_return(true) allow(controller).to receive(:current_user).and_return(user) warden.session(:user)[DeviseXfactorAuthentication::NEED_AUTHENTICATION] = true end end RSpec.configure do |config| config.include Devise::Test::ControllerHelpers, type: :controller config.include ControllerHelper, type: :controller config.before(:example, type: :controller) do @request.env['devise.mapping'] = Devise.mappings[:user] end end
Version data entries
6 entries across 6 versions & 1 rubygems