spec/castronaut/presenters/logout_spec.rb in relevance-castronaut-0.4.1 vs spec/castronaut/presenters/logout_spec.rb in relevance-castronaut-0.4.2

- old
+ new

@@ -27,10 +27,12 @@ Castronaut::Models::LoginTicket.should_receive(:generate_from).and_return(stub_everything(:ticket => 'ticket')) Castronaut::Presenters::Logout.new(@controller).login_ticket end describe "representing" do + + before { @controller.stub!(:delete_cookie) } it "attempts to find the ticket granting ticket using the ticket granting ticket cookie" do Castronaut::Models::TicketGrantingTicket.should_receive(:find_by_ticket).and_return(nil) Castronaut::Presenters::Logout.new(@controller).represent! end @@ -71,8 +73,13 @@ Castronaut::Models::TicketGrantingTicket.stub!(:find_by_ticket) Castronaut::Presenters::Logout.new(@controller).represent!.messages.should include("You have successfully logged out.") end + it "deletes the tgt cookie from the controller" do + @controller.should_receive(:delete_cookie).with('tgt') + Castronaut::Presenters::Logout.new(@controller).represent! + end + end end