Sha256: d6a17d9b84ce5470697a3d0272f867bde94ddf9942a089e60e1bd52b64df2665

Contents?: true

Size: 1.3 KB

Versions: 10

Compression:

Stored size: 1.3 KB

Contents

require "spec_helper"

module CFoundry
  module V2
    describe QuotaDefinition do
      let(:quota_definition) { build(:quota_definition) }

      it "has guid" do
        quota_definition.guid = "quota-definition-1"
        expect(quota_definition.guid).to eq("quota-definition-1")
      end

      it "has name" do
        quota_definition.name = "name"
        expect(quota_definition.name).to eq("name")
      end

      it "has non_basic_services_allowed" do
        [true, false].each do |v|
          quota_definition.non_basic_services_allowed = v
          expect(quota_definition.non_basic_services_allowed).to eq(v)
        end
      end

      it "has total_services" do
        [0, 1].each do |v|
          quota_definition.total_services = v
          expect(quota_definition.total_services).to eq(v)
        end
      end

      it "has total_services" do
        [0, 1].each do |v|
          quota_definition.total_services = v
          expect(quota_definition.total_services).to eq(v)
        end
      end

      describe "querying" do
        let(:client) { build(:client) }

        it "is queryable by name" do
          expect(client).to receive(:quota_definitions).with({:query=>[:name, "quota-name"]}) {[]}

          client.quota_definition_by_name("quota-name")
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
new_cfoundry-4.9.4 spec/cfoundry/v2/quota_definition_spec.rb
new_cfoundry-4.9.3 spec/cfoundry/v2/quota_definition_spec.rb
ncfoundry-4.9.4 spec/cfoundry/v2/quota_definition_spec.rb
ncfoundry-4.9.3 spec/cfoundry/v2/quota_definition_spec.rb
ncfoundry-4.9.2 spec/cfoundry/v2/quota_definition_spec.rb
new_cfoundry-4.9.2 spec/cfoundry/v2/quota_definition_spec.rb
new_cfoundry-4.9.1 spec/cfoundry/v2/quota_definition_spec.rb
new_cfoundry-4.9.0 spec/cfoundry/v2/quota_definition_spec.rb
new_cfoundry-4.8.3 spec/cfoundry/v2/quota_definition_spec.rb
new_cfoundry-4.8.2 spec/cfoundry/v2/quota_definition_spec.rb