Sha256: 7f48b598e93d31e1cc2a5800feeda3b6f2c1ad499f355281b38d32ad2c4b2260
Contents?: true
Size: 1.13 KB
Versions: 7
Compression:
Stored size: 1.13 KB
Contents
require 'spec_helper' describe CASino::TwoFactorAuthenticatorsController do describe 'GET "new"' do it 'calls the process method of the TwoFactorAuthenticatorRegistrator' do CASinoCore::Processor::TwoFactorAuthenticatorRegistrator.any_instance.should_receive(:process) get :new end end describe 'POST "create"' do it 'calls the process method of the TwoFactorAuthenticatorActivator' do CASinoCore::Processor::TwoFactorAuthenticatorActivator.any_instance.should_receive(:process) do @controller.render nothing: true end post :create end end describe 'DELETE "destroy"' do let(:id) { '123' } let(:tgt) { 'TGT-foobar' } it 'calls the process method of the TwoFactorAuthenticatorDestroyer processor' do request.cookies[:tgt] = tgt CASinoCore::Processor::TwoFactorAuthenticatorDestroyer.any_instance.should_receive(:process) do |params, cookies, user_agent| params[:id].should == id cookies[:tgt].should == tgt user_agent.should == request.user_agent @controller.render nothing: true end delete :destroy, id: id end end end
Version data entries
7 entries across 7 versions & 1 rubygems