Sha256: cf81d59fc51dc5f42adcc83315ab98e3824ebec51225c368e4b89efeeb6a54b2
Contents?: true
Size: 513 Bytes
Versions: 18
Compression:
Stored size: 513 Bytes
Contents
require 'spec_helper' describe Dashing::ApplicationController do describe '#authentication_with_devise' do let(:models) { [:user, :admin] } before do Dashing.stub_chain(:config, :devise_allowed_models).and_return(models) end it 'calls devise authenticate method' do expect(controller).to receive("authenticate_#{models.first.to_s}!") expect(controller).to receive("authenticate_#{models.last.to_s}!") controller.send(:authentication_with_devise) end end end
Version data entries
18 entries across 18 versions & 1 rubygems