Browse files

fix cookie spec - date/expires being funny

  • Loading branch information...
1 parent 4955bbc commit b544d5561539cc1da024e1582085ba14f18d74ae @igrigorik committed Feb 23, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 spec/redirect_spec.rb
View
8 spec/redirect_spec.rb
@@ -42,7 +42,7 @@ def response(r)
it "should not forward cookies across domains with http redirect" do
- expires = (Date.today + 1).strftime('%a, %d %b %Y %T GMT')
+ expires = (Date.today + 2).strftime('%a, %d %b %Y %T GMT')
response =<<-HTTP.gsub(/^ +/, '')
HTTP/1.1 301 MOVED PERMANENTLY
Location: http://localhost:8081/
@@ -68,7 +68,7 @@ def response(r)
it "should forward valid cookies across domains with http redirect" do
- expires = (Date.today + 1).strftime('%a, %d %b %Y %T GMT')
+ expires = (Date.today + 2).strftime('%a, %d %b %Y %T GMT')
response =<<-HTTP.gsub(/^ +/, '')
HTTP/1.1 301 MOVED PERMANENTLY
Location: http://127.0.0.1:8081/
@@ -77,8 +77,8 @@ def response(r)
HTTP
EventMachine.run do
- @stub = StubServer.new(:port => 8080, :response => response)
- @echo = StubServer.new(:port => 8081, :echo => true)
+ @stub = StubServer.new(:host => '127.0.0.1', :port => 8080, :response => response)
+ @echo = StubServer.new(:host => '127.0.0.1', :port => 8081, :echo => true)
http = EventMachine::HttpRequest.new('http://127.0.0.1:8080/').get :redirects => 1

0 comments on commit b544d55

Please sign in to comment.