Sha256: 858d1ebf388a0594becc4052a5b5d70084c7ce0ea6903b9aa80a524d8f0b193f

Contents?: true

Size: 955 Bytes

Versions: 2

Compression:

Stored size: 955 Bytes

Contents

#--
# Cloud Foundry 2012.02.03 Beta
# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
#
# This product is licensed to you under the Apache License, Version 2.0 (the "License").
# You may not use this product except in compliance with the License.
#
# This product includes a number of subcomponents with
# separate copyright notices and license terms. Your use of these
# subcomponents is subject to the terms and conditions of the
# subcomponent's license, as noted in the LICENSE file.
#++

require 'spec_helper'
require 'uaa/http'
require 'uaa/version'

module CF::UAA

describe Http do

  include Http
  include SpecHelper

  it "sets a request handler" do
    set_request_handler do |req|
      [200, "body", {"content-type" => "text/plain"}]
    end
    status, body, resp_headers = http_get("http://example.com")
    status.should == 200
    body.should == "body"
    resp_headers["content-type"].should == "text/plain"
  end

end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cf-uaa-lib-1.3.1 spec/http_spec.rb
cf-uaa-lib-1.3.0 spec/http_spec.rb