Fix wrong HTTP_HOST in rack session
Webrat relies on www.example.com while Rack::Test expects example.org
This commit is contained in:
parent
92ec1c3d92
commit
8cda77318c
@ -1,5 +1,7 @@
|
||||
require "rack/test"
|
||||
|
||||
Rack::Test::DEFAULT_HOST.replace("www.example.com")
|
||||
|
||||
module Webrat
|
||||
class RackSession < Session
|
||||
def initialize(rack_test_session) #:nodoc:
|
||||
|
@ -17,10 +17,10 @@ class WebratRackTest < Test::Unit::TestCase
|
||||
assert_equal "/", last_request.env["PATH_INFO"]
|
||||
end
|
||||
|
||||
# def test_redirects
|
||||
# visit "/redirect_absolute_url"
|
||||
# assert_equal "spam", response_body
|
||||
# end
|
||||
def test_redirects
|
||||
visit "/redirect_absolute_url"
|
||||
assert_equal "spam", response_body
|
||||
end
|
||||
|
||||
def test_assertions_after_visit
|
||||
visit "/"
|
||||
|
Loading…
Reference in New Issue
Block a user