Sha256: 1989c89ad0d0ef4d015068ef47f43e952a7a7e13c3ec9e69353cb8ab06c6d8ec

Contents?: true

Size: 682 Bytes

Versions: 15

Compression:

Stored size: 682 Bytes

Contents

require 'spec_helper'

describe CASino::SessionDestroyerListener do
  include CASino::Engine.routes.url_helpers
  let(:controller) { Struct.new(:cookies).new(cookies: {}) }
  let(:listener) { described_class.new(controller) }

  before(:each) do
    controller.stub(:redirect_to)
  end

  describe '#ticket_not_found' do
    it 'redirects back to the session overview' do
      controller.should_receive(:redirect_to).with(sessions_path)
      listener.ticket_not_found
    end
  end

  describe '#ticket_deleted' do
    it 'redirects back to the session overview' do
      controller.should_receive(:redirect_to).with(sessions_path)
      listener.ticket_deleted
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
casino-3.0.4 spec/controllers/listener/session_destroyer_spec.rb
casino-2.0.7 spec/controllers/listener/session_destroyer_spec.rb
casino-3.0.3 spec/controllers/listener/session_destroyer_spec.rb
casino-3.0.2 spec/controllers/listener/session_destroyer_spec.rb
casino-3.0.1 spec/controllers/listener/session_destroyer_spec.rb
casino-3.0.0 spec/controllers/listener/session_destroyer_spec.rb
casino-3.0.0.pre.2 spec/controllers/listener/session_destroyer_spec.rb
casino-3.0.0.pre.1 spec/controllers/listener/session_destroyer_spec.rb
casino-2.0.6 spec/controllers/listener/session_destroyer_spec.rb
casino-2.0.5 spec/controllers/listener/session_destroyer_spec.rb
casino-2.0.4 spec/controllers/listener/session_destroyer_spec.rb
casino-2.0.3 spec/controllers/listener/session_destroyer_spec.rb
casino-2.0.2 spec/controllers/listener/session_destroyer_spec.rb
casino-2.0.1 spec/controllers/listener/session_destroyer_spec.rb
casino-2.0.0 spec/controllers/listener/session_destroyer_spec.rb