<%= t('sessions.title') %>
- <%= raw t('sessions.currently_logged_in_as', :username => @ticket_granting_tickets[0].user.username) %>
+ <%= raw t('sessions.currently_logged_in_as', :username => current_user.username) %>
<%= link_to t('sessions.label_logout_button'), logout_path, :class => 'button' %>
@@ -18,7 +18,7 @@
<% if @two_factor_authenticators.blank? %>
<%= t('two_factor_authenticators.disabled') %> - <%= link_to t('two_factor_authenticators.enable'), new_two_factor_authenticator_path %>
<% else %>
- <%= t('two_factor_authenticators.enabled') %> - <%= button_to t('two_factor_authenticators.disable'), two_factor_authenticator_path(@two_factor_authenticators[0].id), method: :delete %>
+ <%= t('two_factor_authenticators.enabled') %> - <%= button_to t('two_factor_authenticators.disable'), two_factor_authenticator_path(@two_factor_authenticators.first.id), method: :delete %>
<% end %>
<%= t('sessions.your_active_sessions') %>
diff --git a/app/views/casino/sessions/new.html.erb b/app/views/casino/sessions/new.html.erb
index 610d99ba..71050fc3 100644
--- a/app/views/casino/sessions/new.html.erb
+++ b/app/views/casino/sessions/new.html.erb
@@ -13,7 +13,7 @@
<%= form_tag(login_path, method: :post, id: 'login-form') do %>
- <%= hidden_field_tag :lt, @login_ticket.ticket %>
+ <%= hidden_field_tag :lt, CASino::LoginTicket.create.ticket %>
<%= hidden_field_tag :service, params[:service] unless params[:service].nil? %>
<%= label_tag :username, t('login.label_username') %>
<%= text_field_tag :username, params[:username], autofocus:true %>
diff --git a/app/views/casino/sessions/validate_otp.html.erb b/app/views/casino/sessions/validate_otp.html.erb
index c3122cfc..f075bf9f 100644
--- a/app/views/casino/sessions/validate_otp.html.erb
+++ b/app/views/casino/sessions/validate_otp.html.erb
@@ -8,7 +8,7 @@
<%= hidden_field_tag :tgt, @ticket_granting_ticket || params[:tgt] %>
<%= hidden_field_tag :service, params[:service] %>
<%= label_tag :code, t('validate_otp.code') %>
- <%= text_field_tag :otp, nil, maxlength: 6, autofocus:true %>
+ <%= text_field_tag :otp, nil, maxlength: 6, autofocus: true, autocomplete: 'off' %>
<%= button_tag t('validate_otp.submit'), :class => 'button' %>
<% end %>
diff --git a/app/views/casino/two_factor_authenticators/new.html.erb b/app/views/casino/two_factor_authenticators/new.html.erb
index 3bc79d27..07998255 100644
--- a/app/views/casino/two_factor_authenticators/new.html.erb
+++ b/app/views/casino/two_factor_authenticators/new.html.erb
@@ -11,10 +11,13 @@
<%= t('two_factor_authenticators.instructions') %>
-
" height="250" width="250">
+
- <%= t('two_factor_authenticators.secret') %>: <%= @two_factor_authenticator.secret %>
+ <%= t('two_factor_authenticators.secret') %>:
+
+ <%= @two_factor_authenticator.secret %>
+
@@ -22,7 +25,7 @@
<%= form_tag(two_factor_authenticators_path, method: :post, id: 'two_factor_authenticators-form') do %>
<%= hidden_field_tag :id, @two_factor_authenticator.id %>
<%= label_tag :code, t('two_factor_authenticators.code') %>
- <%= text_field_tag :otp, nil, maxlength: 6, autofocus:true %>
+ <%= text_field_tag :otp, nil, maxlength: 6, autofocus: true, autocomplete: 'off' %>
<%= link_to t('two_factor_authenticators.cancel'), sessions_path, :class => 'secondary button' %>
<%= button_tag t('two_factor_authenticators.submit'), :class => 'button' %>
<% end %>
diff --git a/casino.gemspec b/casino.gemspec
index 9a6ccc21..4021670b 100644
--- a/casino.gemspec
+++ b/casino.gemspec
@@ -34,11 +34,13 @@ Gem::Specification.new do |s|
s.add_development_dependency 'coveralls', '~> 0.7'
s.add_runtime_dependency 'rails', '>= 4.1.0', '< 4.3.0'
- s.add_runtime_dependency 'sass-rails', '~> 4.0.0'
- s.add_runtime_dependency 'http_accept_language', '~> 2.0.0.pre'
+ s.add_runtime_dependency 'sass-rails', '>= 4.0.0', '< 6.0.0'
s.add_runtime_dependency 'addressable', '~> 2.3'
s.add_runtime_dependency 'terminal-table', '~> 1.4'
s.add_runtime_dependency 'useragent', '~> 0.4'
s.add_runtime_dependency 'faraday', '~> 0.8'
s.add_runtime_dependency 'rotp', '~> 2.0'
+ s.add_runtime_dependency 'grape', '~> 0.8'
+ s.add_runtime_dependency 'grape-entity', '~> 0.4'
+ s.add_runtime_dependency 'rqrcode_png', '~> 0.1'
end
diff --git a/config/routes.rb b/config/routes.rb
index 125959a3..0f819f41 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,4 +1,6 @@
CASino::Engine.routes.draw do
+ mount CASino::API => '/api'
+
resources :sessions, only: [:index, :destroy]
resources :two_factor_authenticators, only: [:new, :create, :destroy]
@@ -15,16 +17,7 @@
get 'proxyValidate' => 'proxy_tickets#proxy_validate'
get 'proxy' => 'proxy_tickets#create'
- # api
- scope '/cas' do
- scope module: :api, as: :api do
- namespace :v1 do
- resources :tickets, only: [:create, :destroy] do
- post :update, on: :member
- end
- end
- end
- end
+ get 'authTokenLogin' => 'auth_tokens#login'
root to: redirect('login')
diff --git a/db/migrate/20140831205255_create_auth_token_tickets.rb b/db/migrate/20140831205255_create_auth_token_tickets.rb
new file mode 100644
index 00000000..5e6a0987
--- /dev/null
+++ b/db/migrate/20140831205255_create_auth_token_tickets.rb
@@ -0,0 +1,10 @@
+class CreateAuthTokenTickets < ActiveRecord::Migration
+ def change
+ create_table :casino_auth_token_tickets do |t|
+ t.string :ticket, :null => false
+
+ t.timestamps
+ end
+ add_index :casino_auth_token_tickets, :ticket, :unique => true
+ end
+end
diff --git a/lib/casino.rb b/lib/casino.rb
index f83857c4..7e59d284 100644
--- a/lib/casino.rb
+++ b/lib/casino.rb
@@ -21,6 +21,9 @@ module CASino
two_factor_authenticator: nil,
user: nil
),
+ auth_token_ticket: {
+ lifetime: 60
+ },
login_ticket: {
lifetime: 600
},
@@ -47,4 +50,4 @@ module CASino
}
self.config.merge! defaults.deep_dup
-end
\ No newline at end of file
+end
diff --git a/lib/casino/tasks/authentication.rake b/lib/casino/tasks/authentication.rake
index b49efafa..13febaf1 100644
--- a/lib/casino/tasks/authentication.rake
+++ b/lib/casino/tasks/authentication.rake
@@ -4,7 +4,7 @@ namespace :casino do
namespace :authentication do
desc 'Test authentication.'
task test: :environment do |task, args|
- include CASino::ProcessorConcern::Authentication
+ include CASino::AuthenticationProcessor
print "Username: "
username = STDIN.gets.chomp
print "Password (won't be shown): "
diff --git a/lib/casino/tasks/cleanup.rake b/lib/casino/tasks/cleanup.rake
index 6b0e528a..af9d6039 100644
--- a/lib/casino/tasks/cleanup.rake
+++ b/lib/casino/tasks/cleanup.rake
@@ -31,6 +31,12 @@ namespace :casino do
puts "Deleted #{rows_affected} login tickets."
end
+ desc 'Remove expired auth token tickets.'
+ task auth_token_tickets: :environment do
+ rows_affected = CASino::AuthTokenTicket.cleanup
+ puts "Deleted #{rows_affected} auth token tickets."
+ end
+
desc 'Remove expired inactive two-factor authenticators.'
task two_factor_authenticators: :environment do
rows_affected = CASino::TwoFactorAuthenticator.cleanup
@@ -53,7 +59,13 @@ namespace :casino do
end
desc 'Perform all cleanup tasks.'
- task all: [:acquire_lock, :ticket_granting_tickets, :service_tickets, :proxy_tickets, :login_tickets, :two_factor_authenticators] do
+ task all: [:acquire_lock,
+ :ticket_granting_tickets,
+ :service_tickets,
+ :proxy_tickets,
+ :auth_token_tickets,
+ :login_tickets,
+ :two_factor_authenticators] do
end
end
end
diff --git a/lib/casino/tasks/service_rule.rake b/lib/casino/tasks/service_rule.rake
index 482d31f8..c554c5a6 100644
--- a/lib/casino/tasks/service_rule.rake
+++ b/lib/casino/tasks/service_rule.rake
@@ -5,7 +5,7 @@ namespace :casino do
desc 'Add a service rule (prefix the url parameter with "regex:" to add a regular expression)'
task :add, [:name, :url] => :environment do |task, args|
- include CASino::ProcessorConcern::ServiceTickets
+ include CASino::ServiceTicketProcessor
service_rule = CASino::ServiceRule.new name: args[:name]
match = /^regex:(.*)/.match(args[:url])
if match.nil?
diff --git a/lib/casino/version.rb b/lib/casino/version.rb
index a980330b..572a730c 100644
--- a/lib/casino/version.rb
+++ b/lib/casino/version.rb
@@ -1,3 +1,3 @@
module CASino
- VERSION = '3.0.4'
+ VERSION = '4.0.0.pre.2'
end
diff --git a/spec/controllers/api/v1/tickets_controller_spec.rb b/spec/controllers/api/v1/tickets_controller_spec.rb
deleted file mode 100644
index a267f1f0..00000000
--- a/spec/controllers/api/v1/tickets_controller_spec.rb
+++ /dev/null
@@ -1,114 +0,0 @@
-require 'spec_helper'
-
-describe CASino::Api::V1::TicketsController do
-
- describe "POST /cas/v1/tickets" do
- context "with correct credentials" do
-
- before do
- CASino::API::LoginCredentialAcceptorProcessor.any_instance.should_receive(:process) do
- @controller.user_logged_in_via_api "TGT-long-string"
- end
-
- post :create, username: 'valid', password: 'valid', use_route: :casino
- end
-
- subject { response }
- its(:response_code) { should eq 201 }
- its(:location) { should eq 'http://test.host/cas/v1/tickets/TGT-long-string' }
- end
-
- context "with incorrect credentials" do
-
- before do
- CASino::API::LoginCredentialAcceptorProcessor.any_instance.should_receive(:process) do
- @controller.invalid_login_credentials_via_api
- end
-
- post :create, username: 'invalid', password: 'invalid', use_route: :casino
- end
-
- subject { response }
- its(:response_code) { should eq 400 }
- end
-
- context "with a not allowed service" do
-
- before do
- CASino::API::LoginCredentialAcceptorProcessor.any_instance.should_receive(:process) do
- @controller.service_not_allowed_via_api
- end
-
- post :create, username: 'example', password: 'example', use_route: :casino
- end
-
- subject { response }
- its(:response_code) { should eq 400 }
- end
- end
-
- describe "POST /cas/v1/tickets/{TGT id}" do
-
- context "with a valid TGT" do
-
- before do
- CASino::API::ServiceTicketProviderProcessor.any_instance.should_receive(:process).with('TGT-valid', kind_of(Hash), request.user_agent) do |ticket, params|
- params.should == controller.params
- @controller.granted_service_ticket_via_api 'ST-1-VALIDSERVICETICKET'
- end
- post :update, id: 'TGT-valid', service: 'http://example.org/', use_route: :casino
- end
-
- subject { response }
-
- its(:response_code) { should eq 200 }
- its(:body) { should eq 'ST-1-VALIDSERVICETICKET' }
- end
-
- context "with an invalid TGT" do
-
- before do
- CASino::API::ServiceTicketProviderProcessor.any_instance.should_receive(:process).with('TGT-invalid', kind_of(Hash), request.user_agent) do |ticket, params|
- params.should == controller.params
- @controller.invalid_ticket_granting_ticket_via_api
- end
- post :update, id: 'TGT-invalid', service: 'http://example.org/', use_route: :casino
- end
-
- subject { response }
-
- its(:response_code) { should eq 400 }
-
- end
-
- context "without a service" do
-
- before do
- CASino::API::ServiceTicketProviderProcessor.any_instance.should_receive(:process).with('TGT-valid', kind_of(Hash), request.user_agent) do |ticket, params|
- params.should == controller.params
- @controller.no_service_provided_via_api
- end
- post :update, id:'TGT-valid', use_route: :casino
- end
-
- subject { response }
-
- its(:response_code) { should eq 400 }
-
- end
- end
-
- describe "DELETE /cas/v1/tickets/TGT-fdsjfsdfjkalfewrihfdhfaie" do
- before do
- CASino::API::LogoutProcessor.any_instance.should_receive(:process).with('TGT-fdsjfsdfjkalfewrihfdhfaie', request.user_agent) do
- @controller.user_logged_out_via_api
- end
- post :destroy, id: 'TGT-fdsjfsdfjkalfewrihfdhfaie', use_route: :casino
- end
-
- subject { response }
-
- its(:response_code) { should eq 200 }
- end
-
-end
diff --git a/spec/controllers/auth_tokens_controller_spec.rb b/spec/controllers/auth_tokens_controller_spec.rb
new file mode 100644
index 00000000..3aade54d
--- /dev/null
+++ b/spec/controllers/auth_tokens_controller_spec.rb
@@ -0,0 +1,75 @@
+require 'spec_helper'
+
+describe CASino::AuthTokensController do
+ include CASino::Engine.routes.url_helpers
+
+ let(:params) { { } }
+ let(:request_options) { params.merge(use_route: :casino) }
+
+ before(:each) do
+ CASino::AuthTokenValidationService.any_instance.stub(:validation_result).and_return(validation_result)
+ end
+
+ describe 'GET "authTokenLogin"' do
+ context 'with invalid data' do
+ let(:validation_result) { false }
+ let(:service) { 'http://www.example.org/' }
+ let(:params) { { service: service } }
+
+ it 'redirects to the login' do
+ get :login, request_options
+ response.should redirect_to(login_path(service: service))
+ end
+ end
+
+ context 'with valid data' do
+ let(:validation_result) { { authenticator: 'icanhaz', user_data: { username: 'cheezeburger' } } }
+
+ context 'with a not allowed service' do
+ before(:each) do
+ FactoryGirl.create :service_rule, :regex, url: '^https://.*'
+ end
+
+ let(:service) { 'http://www.example.org/' }
+ let(:params) { { service: service } }
+
+ it 'renders the service_not_allowed template' do
+ get :login, request_options
+ response.should render_template(:service_not_allowed)
+ end
+ end
+
+ context 'with a service' do
+ let(:service) { 'http://www.example.org/' }
+ let(:params) { { service: service } }
+
+ it 'redirects to the service' do
+ get :login, request_options
+ response.location.should =~ /^#{Regexp.escape service}\?ticket=ST-/
+ end
+
+ it 'generates a service ticket' do
+ lambda do
+ get :login, request_options
+ end.should change(CASino::ServiceTicket, :count).by(1)
+ end
+ end
+
+ it 'creates a cookie' do
+ get :login, request_options
+ response.cookies['tgt'].should_not be_nil
+ end
+
+ it 'generates a ticket-granting ticket' do
+ lambda do
+ get :login, request_options
+ end.should change(CASino::TicketGrantingTicket, :count).by(1)
+ end
+
+ it 'redirects to the session overview' do
+ get :login, request_options
+ response.should redirect_to(sessions_path)
+ end
+ end
+ end
+end
diff --git a/spec/controllers/listener/legacy_validator_spec.rb b/spec/controllers/listener/legacy_validator_spec.rb
deleted file mode 100644
index cc78d023..00000000
--- a/spec/controllers/listener/legacy_validator_spec.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-require 'spec_helper'
-
-describe CASino::LegacyValidatorListener do
- let(:controller) { Object.new }
- let(:listener) { described_class.new(controller) }
- let(:response_text) { "foobar\nbla\n" }
- let(:render_parameters) { { text: response_text, content_type: 'text/plain' } }
-
- describe '#validation_succeeded' do
- it 'tells the controller to render the response text' do
- controller.should_receive(:render).with(render_parameters)
- listener.validation_succeeded(response_text)
- end
- end
-
- describe '#validation_failed' do
- it 'tells the controller to render the response text' do
- controller.should_receive(:render).with(render_parameters)
- listener.validation_failed(response_text)
- end
- end
-end
diff --git a/spec/controllers/listener/login_credential_acceptor_spec.rb b/spec/controllers/listener/login_credential_acceptor_spec.rb
deleted file mode 100644
index 29f7cb71..00000000
--- a/spec/controllers/listener/login_credential_acceptor_spec.rb
+++ /dev/null
@@ -1,108 +0,0 @@
-require 'spec_helper'
-
-describe CASino::LoginCredentialAcceptorListener 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 '#user_logged_in' do
- let(:ticket_granting_ticket) { 'TGT-123' }
- context 'with a service url' do
- let(:url) { 'http://www.example.com/?ticket=ST-123' }
- it 'tells the controller to redirect the client' do
- controller.should_receive(:redirect_to).with(url, status: :see_other)
- listener.user_logged_in(url, ticket_granting_ticket)
- end
- end
-
- context 'without a service url' do
- let(:url) { nil }
- it 'tells the controller to redirect to the session overview' do
- controller.should_receive(:redirect_to).with(sessions_path, status: :see_other)
- listener.user_logged_in(url, ticket_granting_ticket)
- end
-
- it 'creates the tgt cookie' do
- listener.user_logged_in(url, ticket_granting_ticket)
- controller.cookies[:tgt][:value].should == ticket_granting_ticket
- end
- end
-
- context 'with cookie expiry time' do
- let(:url) { Object.new }
- let(:expiry_time) { Time.now }
- it 'set the tgt cookie expiry time' do
- listener.user_logged_in(url, ticket_granting_ticket, expiry_time)
- controller.cookies[:tgt][:value].should == ticket_granting_ticket
- controller.cookies[:tgt][:expires].should == expiry_time
- end
- end
- end
-
- [:invalid_login_credentials, :invalid_login_ticket].each do |method|
- context "##{method}" do
- let(:login_ticket) { Object.new }
- let(:flash) { ActionDispatch::Flash::FlashHash.new }
-
- before(:each) do
- controller.stub(:render)
- controller.stub(:flash).and_return(flash)
- end
-
- it 'tells the controller to render the new template' do
- controller.should_receive(:render).with('new', status: 403)
- listener.send(method, login_ticket)
- end
-
- it 'assigns a new login ticket' do
- listener.send(method, login_ticket)
- controller.instance_variable_get(:@login_ticket).should == login_ticket
- end
-
- it 'should add an error message' do
- listener.send(method, login_ticket)
- flash[:error].should == I18n.t("login_credential_acceptor.#{method}")
- end
- end
- end
-
- context '#service_not_allowed' do
- let(:service) { 'http://www.example.com/foo' }
-
- before(:each) do
- controller.stub(:render)
- end
-
- it 'tells the controller to render the service_not_allowed template' do
- controller.should_receive(:render).with('service_not_allowed', status: 403)
- listener.send(:service_not_allowed, service)
- end
-
- it 'assigns the not allowed service' do
- listener.send(:service_not_allowed, service)
- controller.instance_variable_get(:@service).should == service
- end
- end
-
- context '#two_factor_authentication_pending' do
- let(:ticket_granting_ticket) { 'TGT-123' }
-
- before(:each) do
- controller.stub(:render)
- end
-
- it 'tells the controller to render the service_not_allowed template' do
- controller.should_receive(:render).with('validate_otp')
- listener.send(:two_factor_authentication_pending, ticket_granting_ticket)
- end
-
- it 'assigns the not allowed service' do
- listener.send(:two_factor_authentication_pending, ticket_granting_ticket)
- controller.instance_variable_get(:@ticket_granting_ticket).should == ticket_granting_ticket
- end
- end
-end
diff --git a/spec/controllers/listener/login_credential_requestor_spec.rb b/spec/controllers/listener/login_credential_requestor_spec.rb
deleted file mode 100644
index 3fe67518..00000000
--- a/spec/controllers/listener/login_credential_requestor_spec.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-require 'spec_helper'
-
-describe CASino::LoginCredentialRequestorListener do
- include CASino::Engine.routes.url_helpers
- let(:controller) { Struct.new(:cookies).new(cookies: {}) }
- let(:listener) { described_class.new(controller) }
-
- describe '#user_not_logged_in' do
- let(:login_ticket) { Object.new }
- it 'assigns the login ticket' do
- listener.user_not_logged_in(login_ticket)
- controller.instance_variable_get(:@login_ticket).should == login_ticket
- end
-
- it 'deletes an existing ticket-granting ticket cookie' do
- controller.cookies = { tgt: 'TGT-12345' }
- listener.user_not_logged_in(login_ticket)
- controller.cookies[:tgt].should be_nil
- end
- end
-
- describe '#user_logged_in' do
- context 'with a service url' do
- let(:url) { 'http://www.example.com/?ticket=ST-123' }
- it 'tells the controller to redirect the client' do
- controller.should_receive(:redirect_to).with(url, status: :see_other)
- listener.user_logged_in(url)
- end
- end
-
- context 'without a service url' do
- let(:url) { nil }
- it 'tells the controller to redirect to the session overview' do
- controller.should_receive(:redirect_to).with(sessions_path)
- listener.user_logged_in(url)
- end
- end
- end
-
- context '#service_not_allowed' do
- let(:service) { 'http://www.example.com/foo' }
-
- before(:each) do
- controller.stub(:render)
- end
-
- it 'tells the controller to render the service_not_allowed template' do
- controller.should_receive(:render).with('service_not_allowed', status: 403)
- listener.send(:service_not_allowed, service)
- end
-
- it 'assigns the not allowed service' do
- listener.send(:service_not_allowed, service)
- controller.instance_variable_get(:@service).should == service
- end
- end
-end
diff --git a/spec/controllers/listener/logout_spec.rb b/spec/controllers/listener/logout_spec.rb
deleted file mode 100644
index 3c13c022..00000000
--- a/spec/controllers/listener/logout_spec.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-require 'spec_helper'
-
-describe CASino::LogoutListener do
- include Rails.application.routes.url_helpers
- let(:controller) { Struct.new(:cookies).new(cookies: {}) }
- let(:listener) { described_class.new(controller) }
-
- describe '#user_logged_out' do
- let(:url) { 'http://www.example.com/test' }
- it 'assigns the url' do
- listener.user_logged_out(url)
- controller.instance_variable_get(:@url).should == url
- end
-
- it 'deletes an existing ticket-granting ticket cookie' do
- controller.cookies = { tgt: 'TGT-12345' }
- listener.user_logged_out(url)
- controller.cookies[:tgt].should be_nil
- end
-
- context 'with redirect_immediately flag' do
- before(:each) do
- controller.stub(:redirect_to)
- end
-
- it 'tells the controller to redirect the client' do
- controller.should_receive(:redirect_to).with(url, status: :see_other)
- listener.user_logged_out(url, true)
- end
-
- it 'deletes an existing ticket-granting ticket cookie' do
- controller.cookies = { tgt: 'TGT-12345' }
- listener.user_logged_out(url, true)
- controller.cookies[:tgt].should be_nil
- end
- end
- end
-end
diff --git a/spec/controllers/listener/other_sessions_destroyer_spec.rb b/spec/controllers/listener/other_sessions_destroyer_spec.rb
deleted file mode 100644
index 819cd935..00000000
--- a/spec/controllers/listener/other_sessions_destroyer_spec.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-require 'spec_helper'
-
-describe CASino::OtherSessionsDestroyerListener 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 '#other_sessions_destroyed' do
- let(:service) { 'http://www.example.com/' }
- it 'redirects back to the URL' do
- controller.should_receive(:redirect_to).with(service)
- listener.other_sessions_destroyed(service)
- end
- end
-end
diff --git a/spec/controllers/listener/proxy_ticket_provider_spec.rb b/spec/controllers/listener/proxy_ticket_provider_spec.rb
deleted file mode 100644
index bd25f5d7..00000000
--- a/spec/controllers/listener/proxy_ticket_provider_spec.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-require 'spec_helper'
-
-describe CASino::ProxyTicketProviderListener do
- let(:controller) { Object.new }
- let(:listener) { described_class.new(controller) }
- let(:xml) { "