This commit is contained in:
Matt Zukowski 2010-09-09 18:09:59 -04:00
Родитель 5097095237
Коммит 223e76b00b
1 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -69,14 +69,26 @@ describe CASServer do
end # describe '/login' end # describe '/login'
describe '/logout' do describe '/logout' do
before do
@target_service = 'http://my.app.test'
end
it "logs out successfully" do it "logs out successfully" do
# capybara doesn't let us post directly :( # capybara doesn't let us post directly :(
Capybara.current_session.driver.post '/logout' #Capybara.current_session.driver.post '/logout'
puts page.body visit "/logout"
page.should have_content("You have successfully logged out") page.should have_content("You have successfully logged out")
end end
it "logs out successfully and redirects to target service" do
visit "/logout?gateway=true&service="+CGI.escape(@target_service)
page.current_url.should =~ /^#{Regexp.escape(@target_service)}\/?/
end
end # describe '/logout' end # describe '/logout'
end end