Sha256: f5006955087eef31232d4d974e5db6ca3d3f4c2dc03fe61a4e0c61c66c51855a

Contents?: true

Size: 1.02 KB

Versions: 114

Compression:

Stored size: 1.02 KB

Contents

require 'spec_helper'
require 'net/http'
require 'uri'

describe CcApiStub::Spaces do
  describe ".succeed_to_load" do
    let(:url) { "http://example.com/v2/spaces/234" }
    subject { CcApiStub::Spaces.succeed_to_load }

    it_behaves_like "a stubbed get request"
  end

  describe ".succeed_to_create" do
    let(:url) { "http://example.com/v2/spaces" }
    subject { CcApiStub::Spaces.succeed_to_create }

    it_behaves_like "a stubbed post request"
  end

  describe ".summary_fixture" do
    it "returns a space fixture" do
      CcApiStub::Spaces.summary_fixture.should be_a(Hash)
    end
  end

  describe ".succeed_to_load_summary" do
    let(:url) { "http://example.com/v2/spaces/234/summary" }
    subject { CcApiStub::Spaces.succeed_to_load_summary }

    it_behaves_like "a stubbed get request"

    context "when specifying no_services" do
      subject { CcApiStub::Spaces.succeed_to_load_summary(:no_services => true) }

      it_behaves_like "a stubbed get request", :including_json => {"services" => []}
    end
  end
end

Version data entries

114 entries across 114 versions & 2 rubygems

Version Path
cfoundry-2.1.0 spec/cc_api_stub/spaces_spec.rb
cfoundry-2.0.2 spec/cc_api_stub/spaces_spec.rb
cfoundry-2.0.1.rc1 spec/cc_api_stub/spaces_spec.rb
cfoundry-2.0.0 spec/cc_api_stub/spaces_spec.rb
cfoundry-1.5.3 spec/cc_api_stub/spaces_spec.rb
cfoundry-1.5.2 spec/cc_api_stub/spaces_spec.rb
cfoundry-1.5.1 spec/cc_api_stub/spaces_spec.rb
cfoundry-1.5.0 spec/cc_api_stub/spaces_spec.rb
cfoundry-1.4.0 spec/cc_api_stub/spaces_spec.rb
cfoundry-1.3.0 spec/cc_api_stub/spaces_spec.rb
cfoundry-1.2.0 spec/cc_api_stub/spaces_spec.rb
cfoundry-1.1.0.rc4 spec/cc_api_stub/spaces_spec.rb
cfoundry-1.1.0.rc3 spec/cc_api_stub/spaces_spec.rb
cfoundry-1.1.0.rc2 spec/cc_api_stub/spaces_spec.rb
cfoundry-1.1.0.rc1 spec/cc_api_stub/spaces_spec.rb
static-1.0.3 vendor/cfoundry-0.5.2/spec/cc_api_stub/spaces_spec.rb
cfoundry-1.0.0 spec/cc_api_stub/spaces_spec.rb
cfoundry-0.7.0.rc15 spec/cc_api_stub/spaces_spec.rb
cfoundry-0.7.0.rc14 spec/cc_api_stub/spaces_spec.rb
cfoundry-0.7.0.rc13 spec/cc_api_stub/spaces_spec.rb