Methods
- S
- T
-
- test_delete,
- test_delete_via_redirect,
- test_follow_redirect_raises_when_no_redirect,
- test_get,
- test_get_via_redirect,
- test_head,
- test_host!,
- test_https_bang_works_and_sets_truth_by_default,
- test_patch,
- test_patch_via_redirect,
- test_post,
- test_post_via_redirect,
- test_put,
- test_put_via_redirect,
- test_request_via_redirect_follows_redirects,
- test_request_via_redirect_returns_status,
- test_request_via_redirect_uses_given_method,
- test_xml_http_request_delete,
- test_xml_http_request_get,
- test_xml_http_request_head,
- test_xml_http_request_override_accept,
- test_xml_http_request_patch,
- test_xml_http_request_post,
- test_xml_http_request_put
Constants
| StubApp | = | lambda { |env| [200, {"Content-Type" => "text/html", "Content-Length" => "13"}, ["Hello, World!"]] } |
Instance Public methods
setup()
Link
test_delete()
Link
test_delete_via_redirect()
Link
# File actionpack/test/controller/integration_test.rb, line 78 def test_delete_via_redirect path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } @session.expects(:request_via_redirect).with(:delete, path, args, headers) @session.delete_via_redirect(path, args, headers) end
test_follow_redirect_raises_when_no_redirect()
Link
test_get()
Link
test_get_via_redirect()
Link
# File actionpack/test/controller/integration_test.rb, line 54 def test_get_via_redirect path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } @session.expects(:request_via_redirect).with(:get, path, args, headers) @session.get_via_redirect(path, args, headers) end
test_head()
Link
test_host!()
Link
test_https_bang_works_and_sets_truth_by_default()
Link
test_patch()
Link
test_patch_via_redirect()
Link
# File actionpack/test/controller/integration_test.rb, line 66 def test_patch_via_redirect path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } @session.expects(:request_via_redirect).with(:patch, path, args, headers) @session.patch_via_redirect(path, args, headers) end
test_post()
Link
test_post_via_redirect()
Link
# File actionpack/test/controller/integration_test.rb, line 60 def test_post_via_redirect path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } @session.expects(:request_via_redirect).with(:post, path, args, headers) @session.post_via_redirect(path, args, headers) end
test_put()
Link
test_put_via_redirect()
Link
# File actionpack/test/controller/integration_test.rb, line 72 def test_put_via_redirect path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } @session.expects(:request_via_redirect).with(:put, path, args, headers) @session.put_via_redirect(path, args, headers) end
test_request_via_redirect_follows_redirects()
Link
# File actionpack/test/controller/integration_test.rb, line 40 def test_request_via_redirect_follows_redirects path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue"} @session.stubs(:redirect?).returns(true, true, false) @session.expects(:follow_redirect!).times(2) @session.request_via_redirect(:get, path, args, headers) end
test_request_via_redirect_returns_status()
Link
# File actionpack/test/controller/integration_test.rb, line 47 def test_request_via_redirect_returns_status path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue"} @session.stubs(:redirect?).returns(false) @session.stubs(:status).returns(200) assert_equal 200, @session.request_via_redirect(:get, path, args, headers) end
test_request_via_redirect_uses_given_method()
Link
# File actionpack/test/controller/integration_test.rb, line 33 def test_request_via_redirect_uses_given_method path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue"} @session.expects(:process).with(:put, path, args, headers) @session.stubs(:redirect?).returns(false) @session.request_via_redirect(:put, path, args, headers) end
test_xml_http_request_delete()
Link
# File actionpack/test/controller/integration_test.rb, line 160 def test_xml_http_request_delete path = "/index"; params = "blah"; headers = {:location => 'blah'} headers_after_xhr = headers.merge( "HTTP_X_REQUESTED_WITH" => "XMLHttpRequest", "HTTP_ACCEPT" => "text/javascript, text/html, application/xml, text/xml, */*" ) @session.expects(:process).with(:delete,path,params,headers_after_xhr) @session.xml_http_request(:delete,path,params,headers) end
test_xml_http_request_get()
Link
# File actionpack/test/controller/integration_test.rb, line 120 def test_xml_http_request_get path = "/index"; params = "blah"; headers = {:location => 'blah'} headers_after_xhr = headers.merge( "HTTP_X_REQUESTED_WITH" => "XMLHttpRequest", "HTTP_ACCEPT" => "text/javascript, text/html, application/xml, text/xml, */*" ) @session.expects(:process).with(:get,path,params,headers_after_xhr) @session.xml_http_request(:get,path,params,headers) end
test_xml_http_request_head()
Link
# File actionpack/test/controller/integration_test.rb, line 170 def test_xml_http_request_head path = "/index"; params = "blah"; headers = {:location => 'blah'} headers_after_xhr = headers.merge( "HTTP_X_REQUESTED_WITH" => "XMLHttpRequest", "HTTP_ACCEPT" => "text/javascript, text/html, application/xml, text/xml, */*" ) @session.expects(:process).with(:head,path,params,headers_after_xhr) @session.xml_http_request(:head,path,params,headers) end
test_xml_http_request_override_accept()
Link
# File actionpack/test/controller/integration_test.rb, line 180 def test_xml_http_request_override_accept path = "/index"; params = "blah"; headers = {:location => 'blah', "HTTP_ACCEPT" => "application/xml"} headers_after_xhr = headers.merge( "HTTP_X_REQUESTED_WITH" => "XMLHttpRequest" ) @session.expects(:process).with(:post,path,params,headers_after_xhr) @session.xml_http_request(:post,path,params,headers) end
test_xml_http_request_patch()
Link
# File actionpack/test/controller/integration_test.rb, line 140 def test_xml_http_request_patch path = "/index"; params = "blah"; headers = {:location => 'blah'} headers_after_xhr = headers.merge( "HTTP_X_REQUESTED_WITH" => "XMLHttpRequest", "HTTP_ACCEPT" => "text/javascript, text/html, application/xml, text/xml, */*" ) @session.expects(:process).with(:patch,path,params,headers_after_xhr) @session.xml_http_request(:patch,path,params,headers) end
test_xml_http_request_post()
Link
# File actionpack/test/controller/integration_test.rb, line 130 def test_xml_http_request_post path = "/index"; params = "blah"; headers = {:location => 'blah'} headers_after_xhr = headers.merge( "HTTP_X_REQUESTED_WITH" => "XMLHttpRequest", "HTTP_ACCEPT" => "text/javascript, text/html, application/xml, text/xml, */*" ) @session.expects(:process).with(:post,path,params,headers_after_xhr) @session.xml_http_request(:post,path,params,headers) end
test_xml_http_request_put()
Link
# File actionpack/test/controller/integration_test.rb, line 150 def test_xml_http_request_put path = "/index"; params = "blah"; headers = {:location => 'blah'} headers_after_xhr = headers.merge( "HTTP_X_REQUESTED_WITH" => "XMLHttpRequest", "HTTP_ACCEPT" => "text/javascript, text/html, application/xml, text/xml, */*" ) @session.expects(:process).with(:put,path,params,headers_after_xhr) @session.xml_http_request(:put,path,params,headers) end