Module: Omniauth::Rails::Test::ControllerHelpers

Defined in:
lib/omniauth/rails/test/controller_helpers.rb

Instance Method Summary collapse

Instance Method Details

#authenticated?Boolean

Returns:

  • (Boolean)


10
11
12
13
# File 'lib/omniauth/rails/test/controller_helpers.rb', line 10

def authenticated?
  session["OmniauthRailsAuthData"].present? &&
    session["OmniauthRailsAuthData"]["email"].present?
end

#sign_in(email) ⇒ Object



6
7
8
# File 'lib/omniauth/rails/test/controller_helpers.rb', line 6

def (email)
  session["OmniauthRailsAuthData"] = { "email" => email }
end