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-4.7.2.rc1 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.7.1 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.7.1.rc1 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.7.0 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.6.3.rc3 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.6.3.rc2 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.6.3.rc1 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.6.2 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.6.1 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.6.0 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.5.3 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.5.2 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.5.1 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.5.0 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.3.12 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.3.11 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.3.10 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.3.9 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.3.8 spec/cc_api_stub/spaces_spec.rb
cfoundry-4.3.7 spec/cc_api_stub/spaces_spec.rb