aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2015-10-12 17:33:07 -0500
committerPratik Naik <pratiknaik@gmail.com>2015-10-12 17:33:07 -0500
commitd621ae41c11398992647c600b484446ecc76a11b (patch)
tree690d9e873e0f676de67f33a25023c5f9a550b4fe
parent8275cfb20fda9c89c5b8d7fc17f9f88822fc34d2 (diff)
downloadrails-d621ae41c11398992647c600b484446ecc76a11b.tar.gz
rails-d621ae41c11398992647c600b484446ecc76a11b.tar.bz2
rails-d621ae41c11398992647c600b484446ecc76a11b.zip
Set appropriate origin and host in the tests
-rw-r--r--test/connection/base_test.rb5
1 files changed, 3 insertions, 2 deletions
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