Sha256: fb2ba737b25b99b0f7d3931900f1ce31e39298d4eceeccd43da6185da30660e1

Contents?: true

Size: 552 Bytes

Versions: 18

Compression:

Stored size: 552 Bytes

Contents

RSpec.describe Spree::Admin::UserSessionsController, type: :controller do
  before { @request.env['devise.mapping'] = Devise.mappings[:spree_user] }

  describe '#authorization_failure' do
    subject { get :authorization_failure }

    context 'user signed in' do
      before { allow(controller).to receive(:spree_current_user) { build_stubbed(:user) } }

      it { is_expected.to render_template 'authorization_failure' }
    end

    context 'user not signed in' do
      it { is_expected.to redirect_to spree.admin_login_path }
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
spree_auth_devise-4.6.3 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.6.2 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.6.1 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.6.0 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.5.0 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.4.2 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.1.1 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.2.1 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.4.1 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.4.0 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.3.4 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.3.3 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.3.2 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.3.1 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.3.0 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.2.0 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.1.0 spec/controllers/spree/admin/user_sessions_controller_spec.rb
spree_auth_devise-4.1.0.rc1 spec/controllers/spree/admin/user_sessions_controller_spec.rb