Methods
D
S
T
Constants
StubApp = lambda { |env| [200, {"Content-Type" => "text/html", "Content-Length" => "13"}, ["Hello, World!"]] }
 
Instance Public methods
deprecated_test_head()
# File actionpack/test/controller/integration_test.rb, line 219
def deprecated_test_head
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:head, path, params: params, headers: headers] do
    assert_deprecated {
      @session.head(path, params, headers)
    }
  end
end
setup()
# File actionpack/test/controller/integration_test.rb, line 10
def setup
  @session = ActionDispatch::Integration::Session.new(StubApp)
end
test_delete()
# File actionpack/test/controller/integration_test.rb, line 196
def test_delete
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:delete, path, params: params, headers: headers] do
    assert_deprecated {
      @session.delete(path,params,headers)
    }
  end
end
test_deprecated_args_xml_http_request_delete()
# File actionpack/test/controller/integration_test.rb, line 328
def test_deprecated_args_xml_http_request_delete
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:delete, path, params: params, headers: headers, xhr: true] do
    assert_deprecated(/xml_http_request/) { @session.xml_http_request(:delete, path, params, headers) }
  end
end
test_deprecated_args_xml_http_request_get()
# File actionpack/test/controller/integration_test.rb, line 242
def test_deprecated_args_xml_http_request_get
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:get, path, params: params, headers: headers, xhr: true] do
    assert_deprecated(/xml_http_request/) {
      @session.xml_http_request(:get, path, params, headers)
    }
  end
end
test_deprecated_args_xml_http_request_head()
# File actionpack/test/controller/integration_test.rb, line 349
def test_deprecated_args_xml_http_request_head
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:head, path, params: params, headers: headers, xhr: true] do
    assert_deprecated { @session.xml_http_request(:head, path, params, headers) }
  end
end
test_deprecated_args_xml_http_request_patch()
# File actionpack/test/controller/integration_test.rb, line 286
def test_deprecated_args_xml_http_request_patch
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:patch, path, params: params, headers: headers, xhr: true] do
    assert_deprecated(/xml_http_request/) { @session.xml_http_request(:patch,path,params,headers) }
  end
end
test_deprecated_args_xml_http_request_post()
# File actionpack/test/controller/integration_test.rb, line 265
def test_deprecated_args_xml_http_request_post
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:post, path, params: params, headers: headers, xhr: true] do
    assert_deprecated(/xml_http_request/) { @session.xml_http_request(:post,path,params,headers) }
  end
end
test_deprecated_args_xml_http_request_put()
# File actionpack/test/controller/integration_test.rb, line 307
def test_deprecated_args_xml_http_request_put
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:put, path, params: params, headers: headers, xhr: true] do
    assert_deprecated(/xml_http_request/) { @session.xml_http_request(:put, path, params, headers) }
  end
end
test_deprecated_delete()
# File actionpack/test/controller/integration_test.rb, line 205
def test_deprecated_delete
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:delete, path, params: params, headers: headers] do
    @session.delete(path, params: params, headers: headers)
  end
end
test_deprecated_delete_via_redirect()
# File actionpack/test/controller/integration_test.rb, line 113
def test_deprecated_delete_via_redirect
  path = "/somepath"; args = { id: '1' }; headers = { "X-Test-Header" => "testvalue" }

  assert_called_with @session, :request_via_redirect, [:delete, path, args, headers] do
    assert_deprecated do
      @session.delete_via_redirect(path, args, headers)
    end
  end
end
test_deprecated_get()
# File actionpack/test/controller/integration_test.rb, line 138
def test_deprecated_get
  path = "/index"; params = "blah"; headers = { location: 'blah' }

  assert_called_with @session, :process, [:get, path, params: params, headers: headers] do
    assert_deprecated {
      @session.get(path, params, headers)
    }
  end
end
test_deprecated_get_via_redirect()
# File actionpack/test/controller/integration_test.rb, line 73
def test_deprecated_get_via_redirect
  path = "/somepath"; args = { id: '1' }; headers = { "X-Test-Header" => "testvalue" }

  assert_called_with @session, :request_via_redirect, [:get, path, args, headers] do
    assert_deprecated do
      @session.get_via_redirect(path, args, headers)
    end
  end
end
test_deprecated_patch()
# File actionpack/test/controller/integration_test.rb, line 171
def test_deprecated_patch
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:patch, path, params: params, headers: headers] do
    assert_deprecated {
      @session.patch(path, params, headers)
    }
  end
end
test_deprecated_patch_via_redirect()
# File actionpack/test/controller/integration_test.rb, line 93
def test_deprecated_patch_via_redirect
  path = "/somepath"; args = { id: '1' }; headers = { "X-Test-Header" => "testvalue" }

  assert_called_with @session, :request_via_redirect, [:patch, path, args, headers] do
    assert_deprecated do
      @session.patch_via_redirect(path, args, headers)
    end
  end
end
test_deprecated_post()
# File actionpack/test/controller/integration_test.rb, line 157
def test_deprecated_post
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:post, path, params: params, headers: headers] do
    @session.post(path, params: params, headers: headers)
  end
end
test_deprecated_post_via_redirect()
# File actionpack/test/controller/integration_test.rb, line 83
def test_deprecated_post_via_redirect
  path = "/somepath"; args = { id: '1' }; headers = { "X-Test-Header" => "testvalue" }

  assert_called_with @session, :request_via_redirect, [:post, path, args, headers] do
    assert_deprecated do
      @session.post_via_redirect(path, args, headers)
    end
  end
end
test_deprecated_put()
# File actionpack/test/controller/integration_test.rb, line 187
def test_deprecated_put
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:put, path, params: params, headers: headers] do
    assert_deprecated {
      @session.put(path, params, headers)
    }
  end
end
test_deprecated_put_via_redirect()
# File actionpack/test/controller/integration_test.rb, line 103
def test_deprecated_put_via_redirect
  path = "/somepath"; args = { id: '1' }; headers = { "X-Test-Header" => "testvalue" }

  assert_called_with @session, :request_via_redirect, [:put, path, args, headers] do
    assert_deprecated do
      @session.put_via_redirect(path, args, headers)
    end
  end
end
test_deprecated_request_via_redirect_uses_given_method()
# File actionpack/test/controller/integration_test.rb, line 43
def test_deprecated_request_via_redirect_uses_given_method
  path = "/somepath"; args = { id: '1' }; headers = { "X-Test-Header" => "testvalue" }
  assert_called_with @session, :process, [:put, path, params: args, headers: headers] do
    @session.stub :redirect?, false do
      assert_deprecated { @session.request_via_redirect(:put, path, args, headers) }
    end
  end
end
test_deprecated_xml_http_request_delete()
# File actionpack/test/controller/integration_test.rb, line 321
def test_deprecated_xml_http_request_delete
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:delete, path, params: params, headers: headers, xhr: true] do
    assert_deprecated { @session.xml_http_request(:delete, path, params: params, headers: headers) }
  end
end
test_deprecated_xml_http_request_get()
# File actionpack/test/controller/integration_test.rb, line 235
def test_deprecated_xml_http_request_get
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:get, path, params: params, headers: headers, xhr: true] do
    @session.get(path, params: params, headers: headers, xhr: true)
  end
end
test_deprecated_xml_http_request_head()
# File actionpack/test/controller/integration_test.rb, line 342
def test_deprecated_xml_http_request_head
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:head, path, params: params, headers: headers, xhr: true] do
    assert_deprecated(/xml_http_request/) { @session.xml_http_request(:head, path, params: params, headers: headers) }
  end
end
test_deprecated_xml_http_request_patch()
# File actionpack/test/controller/integration_test.rb, line 279
def test_deprecated_xml_http_request_patch
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:patch, path, params: params, headers: headers, xhr: true] do
    @session.patch(path, params: params, headers: headers, xhr: true)
  end
end
test_deprecated_xml_http_request_post()
# File actionpack/test/controller/integration_test.rb, line 258
def test_deprecated_xml_http_request_post
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:post, path, params: params, headers: headers, xhr: true] do
    @session.post(path, params: params, headers: headers, xhr: true)
  end
end
test_deprecated_xml_http_request_put()
# File actionpack/test/controller/integration_test.rb, line 300
def test_deprecated_xml_http_request_put
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:put, path, params: params, headers: headers, xhr: true] do
    @session.put(path, params: params, headers: headers, xhr: true)
  end
end
test_follow_redirect_raises_when_no_redirect()
# File actionpack/test/controller/integration_test.rb, line 28
def test_follow_redirect_raises_when_no_redirect
  @session.stub :redirect?, false do
    assert_raise(RuntimeError) { @session.follow_redirect! }
  end
end
test_get()
# File actionpack/test/controller/integration_test.rb, line 123
def test_get
  path = "/index"; params = "blah"; headers = { location: 'blah' }

  assert_called_with @session, :process, [:get, path, params: params, headers: headers] do
    @session.get(path, params: params, headers: headers)
  end
end
test_get_with_env_and_headers()
# File actionpack/test/controller/integration_test.rb, line 131
def test_get_with_env_and_headers
  path = "/index"; params = "blah"; headers = { location: 'blah' }; env = { 'HTTP_X_REQUESTED_WITH' => 'XMLHttpRequest' }
  assert_called_with @session, :process, [:get, path, params: params, headers: headers, env: env] do
    @session.get(path, params: params, headers: headers, env: env)
  end
end
test_head()
# File actionpack/test/controller/integration_test.rb, line 212
def test_head
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:head, path, params: params, headers: headers] do
    @session.head(path, params: params, headers: headers)
  end
end
test_host!()
# File actionpack/test/controller/integration_test.rb, line 22
def test_host!
  assert_not_equal "glu.ttono.us", @session.host
  @session.host! "rubyonrails.com"
  assert_equal "rubyonrails.com", @session.host
end
test_https_bang_works_and_sets_truth_by_default()
# File actionpack/test/controller/integration_test.rb, line 14
def test_https_bang_works_and_sets_truth_by_default
  assert !@session.https?
  @session.https!
  assert @session.https?
  @session.https! false
  assert !@session.https?
end
test_patch()
# File actionpack/test/controller/integration_test.rb, line 164
def test_patch
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:patch, path, params: params, headers: headers] do
    @session.patch(path, params: params, headers: headers)
  end
end
test_post()
# File actionpack/test/controller/integration_test.rb, line 148
def test_post
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:post, path, params: params, headers: headers] do
    assert_deprecated {
      @session.post(path, params, headers)
    }
  end
end
test_put()
# File actionpack/test/controller/integration_test.rb, line 180
def test_put
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:put, path, params: params, headers: headers] do
    @session.put(path, params: params, headers: headers)
  end
end
test_request_via_redirect_follows_redirects()
# File actionpack/test/controller/integration_test.rb, line 52
def test_request_via_redirect_follows_redirects
  path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue"}
  value_series = [true, true, false]
  assert_called @session, :follow_redirect!, times: 2 do
    @session.stub :redirect?, ->{ value_series.shift } do
      assert_deprecated { @session.request_via_redirect(:get, path, params: args, headers: headers) }
    end
  end
end
test_request_via_redirect_returns_status()
# File actionpack/test/controller/integration_test.rb, line 62
def test_request_via_redirect_returns_status
  path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue"}
  @session.stub :redirect?, false do
    @session.stub :status, 200 do
      assert_deprecated do
        assert_equal 200, @session.request_via_redirect(:get, path, params: args, headers: headers)
      end
    end
  end
end
test_request_via_redirect_uses_given_method()
# File actionpack/test/controller/integration_test.rb, line 34
def test_request_via_redirect_uses_given_method
  path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue"}
  assert_called_with @session, :process, [:put, path, params: args, headers: headers] do
    @session.stub :redirect?, false do
      assert_deprecated { @session.request_via_redirect(:put, path, params: args, headers: headers) }
    end
  end
end
test_xml_http_request_delete()
# File actionpack/test/controller/integration_test.rb, line 314
def test_xml_http_request_delete
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:delete, path, params: params, headers: headers, xhr: true] do
    @session.delete(path, params: params, headers: headers, xhr: true)
  end
end
test_xml_http_request_get()
# File actionpack/test/controller/integration_test.rb, line 228
def test_xml_http_request_get
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:get, path, params: params, headers: headers, xhr: true] do
    @session.get(path, params: params, headers: headers, xhr: true)
  end
end
test_xml_http_request_head()
# File actionpack/test/controller/integration_test.rb, line 335
def test_xml_http_request_head
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:head, path, params: params, headers: headers, xhr: true] do
    @session.head(path, params: params, headers: headers, xhr: true)
  end
end
test_xml_http_request_patch()
# File actionpack/test/controller/integration_test.rb, line 272
def test_xml_http_request_patch
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:patch, path, params: params, headers: headers, xhr: true] do
    @session.patch(path, params: params, headers: headers, xhr: true)
  end
end
test_xml_http_request_post()
# File actionpack/test/controller/integration_test.rb, line 251
def test_xml_http_request_post
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:post, path, params: params, headers: headers, xhr: true] do
    @session.post(path, params: params, headers: headers, xhr: true)
  end
end
test_xml_http_request_put()
# File actionpack/test/controller/integration_test.rb, line 293
def test_xml_http_request_put
  path = "/index"; params = "blah"; headers = { location: 'blah' }
  assert_called_with @session, :process, [:put, path, params: params, headers: headers, xhr: true] do
    @session.put(path, params: params, headers: headers, xhr: true)
  end
end