Sha256: 8faf5f09c85be1ad033cc56148a101373969e435e62432ff1be9077a6d01f672

Contents?: true

Size: 443 Bytes

Versions: 7

Compression:

Stored size: 443 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Macros::Auth::Authenticate do
  include Warden::Test::Mock

  subject(:authenticate_step) { described_class.new }

  before do
    warden.set_user(user, scope: scope)
  end

  let(:user) { mock_model('User') }
  let(:scope) { :user }
  let(:ctx) { {} }

  it 'expects to authenticate' do
    authenticate_step.call(ctx, scope: scope, warden: warden)

    expect(ctx[:model]).to eql user
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ff-tbl-macros-2.0.2 spec/lib/auth/authenticate_spec.rb
ff-tbl-macros-2.0.1 spec/lib/auth/authenticate_spec.rb
ff-tbl-macros-2.0.0 spec/lib/auth/authenticate_spec.rb
ff-tbl-macros-1.0.2 spec/lib/auth/authenticate_spec.rb
ff-tbl-macros-1.0.1 spec/lib/auth/authenticate_spec.rb
ff-tbl-macros-1.0.0 spec/lib/auth/authenticate_spec.rb
ff-tbl-macros-0.1.8 spec/lib/auth/authenticate_spec.rb