Skip to content

Commit

Permalink
Set appropriate origin and host in the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lifo committed Oct 12, 2015
1 parent 8275cfb commit d621ae4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/connection/base_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ def disconnect

setup do
@server = TestServer.new
@server.config.disable_request_forgery_protection = true

env = Rack::MockRequest.env_for "/test", 'HTTP_CONNECTION' => 'upgrade', 'HTTP_UPGRADE' => 'websocket'
env = Rack::MockRequest.env_for "/test", 'HTTP_CONNECTION' => 'upgrade', 'HTTP_UPGRADE' => 'websocket',
'SERVER_NAME' => 'rubyonrails.com', 'HTTP_ORIGIN' => 'http://rubyonrails.com'

@connection = Connection.new(@server, env)
@response = @connection.process
end
Expand Down

0 comments on commit d621ae4

Please sign in to comment.