Sha256: 0c39f53619c808312aa590494c88eaa2ebe87bca0166e09dad55ef1289ef8d19

Contents?: true

Size: 1.42 KB

Versions: 20

Compression:

Stored size: 1.42 KB

Contents

require "spec_helper"

module CFoundry
  module V2
    describe Service do
      let(:client) { build(:client) }

      subject do
        build(:service)
      end

      before :each do
stub_request(:get, /\/services\/service-guid-\d{1,2}/).to_return :status => 200,
          :headers => {'Content-Type' => 'application/json'},
          :body => <<EOF
  {
    "metadata": {
      "guid": "d1251ac1-fe42-4b4a-84d4-e31e95b547d8",
      "url": "/v2/services/d1251ac1-fe42-4b4a-84d4-e31e95b547d8",
      "created_at": "2013-08-28T12:28:35+04:00",
      "updated_at": "2013-08-28T12:33:27+04:00"
    },
    "entity": {
      "label": "rabbitmq",
      "provider": "rabbitherd",
      "url": "http://rabbitmq.com",
      "description": "RabbitMQ service",
      "version": "1.0",
      "info_url": null,
      "active": true,
      "bindable": true,
      "unique_id": "0aa2f82c-6918-41df-b676-c275b5954ed7",
      "extra": "",
      "tags": [

      ],
      "documentation_url": null,
      "service_plans_url": "/v2/services/d1251ac1-fe42-4b4a-84d4-e31e95b547d8/service_plans"
    }
  }
EOF
      end

      let(:uuid) { "4692e0ca-25ed-495e-9ae1-fcb0bcf26a96" }

      it "has unique_id that can be mutated" do
        subject.unique_id.should == "0aa2f82c-6918-41df-b676-c275b5954ed7"

        subject.unique_id = uuid
        subject.unique_id.should eq(uuid)
      end

      it "has tags" do
        subject.tags.should == []
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
cfoundry-4.7.2.rc1 spec/cfoundry/v2/service_spec.rb
cfoundry-4.7.1 spec/cfoundry/v2/service_spec.rb
cfoundry-4.7.1.rc1 spec/cfoundry/v2/service_spec.rb
cfoundry-4.7.0 spec/cfoundry/v2/service_spec.rb
cfoundry-4.6.3.rc3 spec/cfoundry/v2/service_spec.rb
cfoundry-4.6.3.rc2 spec/cfoundry/v2/service_spec.rb
cfoundry-4.6.3.rc1 spec/cfoundry/v2/service_spec.rb
cfoundry-4.6.2 spec/cfoundry/v2/service_spec.rb
cfoundry-4.6.1 spec/cfoundry/v2/service_spec.rb
cfoundry-4.6.0 spec/cfoundry/v2/service_spec.rb
cfoundry-4.5.3 spec/cfoundry/v2/service_spec.rb
cfoundry-4.5.2 spec/cfoundry/v2/service_spec.rb
cfoundry-4.5.1 spec/cfoundry/v2/service_spec.rb
cfoundry-4.5.0 spec/cfoundry/v2/service_spec.rb
cfoundry-4.3.12 spec/cfoundry/v2/service_spec.rb
cfoundry-4.3.11 spec/cfoundry/v2/service_spec.rb
cfoundry-4.3.10 spec/cfoundry/v2/service_spec.rb
cfoundry-4.3.9 spec/cfoundry/v2/service_spec.rb
cfoundry-4.3.8 spec/cfoundry/v2/service_spec.rb
cfoundry-4.3.7 spec/cfoundry/v2/service_spec.rb