From d621ae41c11398992647c600b484446ecc76a11b Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Mon, 12 Oct 2015 17:33:07 -0500 Subject: Set appropriate origin and host in the tests --- test/connection/base_test.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/connection') diff --git a/test/connection/base_test.rb b/test/connection/base_test.rb index a4bd7f4a03..6c8bacde9a 100644 --- a/test/connection/base_test.rb +++ b/test/connection/base_test.rb @@ -16,9 +16,10 @@ class ActionCable::Connection::BaseTest < ActiveSupport::TestCase 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 -- cgit v1.2.3