Sha256: c72e81e583c54f0f428075aac8cd5035bc8bf9fc694fe25a542a5916d3b84925

Contents?: true

Size: 511 Bytes

Versions: 6

Compression:

Stored size: 511 Bytes

Contents

module ControllerMacros
  def login_user
    @request.env["devise.mapping"] = Devise.mappings[:user]
    user = Fabricate(:user)
    user.confirm! # or set a confirmed_at inside the factory. Only necessary if you are using the "confirmable" module
    sign_in user
  end
end


RSpec.configure do |config|
  config.include Devise::TestHelpers, :type => :controller
  config.include DoorkeeperSsoClient::Mixins::Devise::TestHelpers, :type => :controller
  config.extend ControllerMacros, :type => :controller
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
doorkeeper_sso_client-0.4.10 spec/support/devise.rb
doorkeeper_sso_client-0.4.7 spec/support/devise.rb
doorkeeper_sso_client-0.4.6 spec/support/devise.rb
doorkeeper_sso_client-0.4.5 spec/support/devise.rb
doorkeeper_sso_client-0.4.3 spec/support/devise.rb
doorkeeper_sso_client-0.4.2 spec/support/devise.rb