Sha256: 9c2ddb4fd31c2abb492e55ff173d4563dfdae1049bec71a2b87c102ab501de38

Contents?: true

Size: 416 Bytes

Versions: 15

Compression:

Stored size: 416 Bytes

Contents

require 'spec_helper'

describe Admin::DashboardController, type: :controller do
  context 'when logged in' do
    before { admin_logged_in }

    context 'and admin masquerade by user' do
      let!(:user) { create(:admin_user) }

      before do
        user.masquerade!
        get :index, :masquerade => user.masquerade_key
      end

      it { expect(current_admin_user.reload).to eq(user) }
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
devise_masquerade-0.6.5 spec/controllers/admin/dashboard_controller_spec.rb
devise_masquerade-0.6.4 spec/controllers/admin/dashboard_controller_spec.rb
devise_masquerade-0.6.3 spec/controllers/admin/dashboard_controller_spec.rb
devise_masquerade-0.6.2 spec/controllers/admin/dashboard_controller_spec.rb
devise_masquerade-0.6.1 spec/controllers/admin/dashboard_controller_spec.rb
devise_masquerade-0.6.0 spec/controllers/admin/dashboard_controller_spec.rb
devise_masquerade-0.5.3 spec/controllers/admin/dashboard_controller_spec.rb
devise_masquerade-0.5.2 spec/controllers/admin/dashboard_controller_spec.rb
devise_masquerade-0.5.1 spec/controllers/admin/dashboard_controller_spec.rb
devise_masquerade-0.5.0 spec/controllers/admin/dashboard_controller_spec.rb
devise_masquerade-0.4.0 spec/controllers/admin/dashboard_controller_spec.rb
devise_masquerade-0.3.1 spec/controllers/admin/dashboard_controller_spec.rb
devise_masquerade-0.3.0 spec/controllers/admin/dashboard_controller_spec.rb
devise_masquerade-0.2.0 spec/controllers/admin/dashboard_controller_spec.rb
devise_masquerade-0.1.8 spec/controllers/admin/dashboard_controller_spec.rb