Sha256: 7c0b7a2562bc08755fdc162bb33a37708b87f8a8d8bf38b1f3aa838451867f02

Contents?: true

Size: 433 Bytes

Versions: 10

Compression:

Stored size: 433 Bytes

Contents

require 'spec_helper'
require 'switch_user/provider/session'

class SessionController < TestController
  def current_user
    User.find_by_id(session[:uid]) if session[:uid]
  end
end

RSpec.describe SwitchUser::Provider::Session do
  before do
    SwitchUser.session_key = :uid
  end
  let(:controller) { SessionController.new }
  let(:provider) { SwitchUser::Provider::Session.new(controller) }

  it_behaves_like "a provider"
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
switch_user-1.5.0 spec/provider/session_spec.rb
switch_user-1.4.0 spec/provider/session_spec.rb
switch_user-1.3.1 spec/provider/session_spec.rb
switch_user-1.3.0 spec/provider/session_spec.rb
switch_user-1.2.1 spec/provider/session_spec.rb
switch_user-1.2.0 spec/provider/session_spec.rb
switch_user-1.1.0 spec/provider/session_spec.rb
switch_user-1.0.2 spec/provider/session_spec.rb
switch_user-1.0.1 spec/provider/session_spec.rb
switch_user-1.0.0 spec/provider/session_spec.rb