Sha256: 5fffd97a235343bb65f9010b522d488fc3d53885f9423b19b2c506240ea2bd77

Contents?: true

Size: 369 Bytes

Versions: 17

Compression:

Stored size: 369 Bytes

Contents

require 'spec_helper'

describe DashboardController do
  context 'when logged in' do
    before { logged_in }

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

      before do
        user.masquerade!

        get :index, :masquerade => user.masquerade_key
      end

      it { current_user.reload.should == user }
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
devise_masquerade-0.1.7 spec/controllers/dashboard_controller_spec.rb
devise_masquerade-0.1.6 spec/controllers/dashboard_controller_spec.rb
devise_masquerade-0.1.5 spec/controllers/dashboard_controller_spec.rb
devise_masquerade-0.1.4 spec/controllers/dashboard_controller_spec.rb
devise_masquerade-0.1.3 spec/controllers/dashboard_controller_spec.rb
devise_masquerade-0.1.2 spec/controllers/dashboard_controller_spec.rb
devise_masquerade-0.1.1 spec/controllers/dashboard_controller_spec.rb
devise_masquerade-0.1.0 spec/controllers/dashboard_controller_spec.rb
devise_masquerade-0.0.9 spec/controllers/dashboard_controller_spec.rb
devise_masquerade-0.0.8 spec/controllers/dashboard_controller_spec.rb
devise_masquerade-0.0.7 spec/controllers/dashboard_controller_spec.rb
devise_masquerade-0.0.6 spec/controllers/dashboard_controller_spec.rb
devise_masquerade-0.0.5 spec/controllers/dashboard_controller_spec.rb
devise_masquerade-0.0.4 spec/controllers/dashboard_controller_spec.rb
devise_masquerade-0.0.3 spec/controllers/dashboard_controller_spec.rb
devise_masquerade-0.0.2 spec/controllers/dashboard_controller_spec.rb
devise_masquerade-0.0.1 spec/controllers/dashboard_controller_spec.rb