Sha256: c4b58e47d9853e0ee07aa0c05f9f04668cf32a71a8a3667f0cc5b699aa387a9c

Contents?: true

Size: 801 Bytes

Versions: 15

Compression:

Stored size: 801 Bytes

Contents

require 'spec_helper'

describe CASino::SessionOverviewListener do
  include CASino::Engine.routes.url_helpers
  let(:controller) { Object.new }
  let(:listener) { described_class.new(controller) }

  describe '#user_not_logged_in' do
    before(:each) do
      controller.stub(:redirect_to)
    end

    it 'redirects to the login page' do
      controller.should_receive(:redirect_to).with(login_path)
      listener.user_not_logged_in
    end
  end

  describe '#ticket_granting_tickets_found' do
    let(:ticket_granting_tickets) { [ Object.new, Object.new ] }
    it 'assigns the ticket-granting tickets' do
      listener.ticket_granting_tickets_found(ticket_granting_tickets)
      controller.instance_variable_get(:@ticket_granting_tickets).should == ticket_granting_tickets
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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