Sha256: 77ab9034b74f188138e662d0bf3a2b30e836ecdfae17ed933719a23f2a96b4a6

Contents?: true

Size: 863 Bytes

Versions: 68

Compression:

Stored size: 863 Bytes

Contents

module CcApiStub
  module Domains
    extend Helper

    class << self
      def succeed_to_create
        response_body = Helper.load_fixtures("fake_cc_created_domain")
        stub_post(%r{/v2/domains/?(\?.+)?$}, {}, response(201, response_body))
      end

      def succeed_to_delete
        stub_delete(%r{/v2/domains/[^/\?]+$}, {}, response(200))
      end

      def succeed_to_load_spaces
        response_body = Helper.load_fixtures("fake_cc_domain_spaces")
        stub_get(%r{/v2/domains/[^/]+/spaces.*$}, {}, response(200, response_body))
      end

      def succeed_to_add_space
        response_body = Helper.load_fixtures("fake_cc_created_domain")
        stub_put(%r{/v2/domains/[^/]+/spaces/[^/]+$}, {}, response(201, response_body))
      end

      private

      def object_endpoint
        %r{/v2/domains/[^/]+$}
      end
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
cfoundry-1.5.1 lib/cc_api_stub/domains.rb
cfoundry-1.5.0 lib/cc_api_stub/domains.rb
cfoundry-1.4.0 lib/cc_api_stub/domains.rb
cfoundry-1.3.0 lib/cc_api_stub/domains.rb
cfoundry-1.2.0 lib/cc_api_stub/domains.rb
cfoundry-1.1.0.rc4 lib/cc_api_stub/domains.rb
cfoundry-1.1.0.rc3 lib/cc_api_stub/domains.rb
cfoundry-1.1.0.rc2 lib/cc_api_stub/domains.rb
cfoundry-1.1.0.rc1 lib/cc_api_stub/domains.rb
cfoundry-1.0.0 lib/cc_api_stub/domains.rb
cfoundry-0.7.0.rc15 lib/cc_api_stub/domains.rb
cfoundry-0.7.0.rc14 lib/cc_api_stub/domains.rb
cfoundry-0.7.0.rc13 lib/cc_api_stub/domains.rb
cfoundry-0.7.0.rc12 lib/cc_api_stub/domains.rb
cfoundry-0.7.0.rc11 lib/cc_api_stub/domains.rb
cfoundry-0.7.0.rc10 lib/cc_api_stub/domains.rb
cfoundry-0.7.0.rc9 lib/cc_api_stub/domains.rb
cfoundry-0.7.0.rc8 lib/cc_api_stub/domains.rb
cfoundry-0.7.0.rc6 lib/cc_api_stub/domains.rb
cfoundry-0.7.0.rc5 lib/cc_api_stub/domains.rb