Sha256: 7971cbda0820093b68281c232dd4185e1710d6fc84a857cb8989ebfcd6dc8d0e

Contents?: true

Size: 554 Bytes

Versions: 44

Compression:

Stored size: 554 Bytes

Contents

module CcApiStub
  module Routes
    extend Helper

    class << self
      def succeed_to_load_none
        stub_get(collection_endpoint, {}, response(200, {:resources => []}))
      end

      def succeed_to_create
        response_body = Helper.load_fixtures("fake_cc_created_route")
        stub_post(collection_endpoint, {}, response(201, response_body))
      end

      private

      def collection_endpoint
        %r{/v2/routes/?.*$}
      end

      def object_endpoint(id = nil)
        %r{/v2/routes/#{id}[^/]+$}
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 4 rubygems

Version Path
new_cfoundry-4.9.4 lib/cc_api_stub/routes.rb
new_cfoundry-4.9.3 lib/cc_api_stub/routes.rb
ncfoundry-4.9.4 lib/cc_api_stub/routes.rb
ncfoundry-4.9.3 lib/cc_api_stub/routes.rb
ncfoundry-4.9.2 lib/cc_api_stub/routes.rb
new_cfoundry-4.9.2 lib/cc_api_stub/routes.rb
new_cfoundry-4.9.1 lib/cc_api_stub/routes.rb
new_cfoundry-4.9.0 lib/cc_api_stub/routes.rb
new_cfoundry-4.8.3 lib/cc_api_stub/routes.rb
new_cfoundry-4.8.2 lib/cc_api_stub/routes.rb
jfoundry-0.1.7 lib/cc_api_stub/routes.rb
jfoundry-0.1.6 lib/cc_api_stub/routes.rb
cfoundry-4.7.2.rc1 lib/cc_api_stub/routes.rb
cfoundry-4.7.1 lib/cc_api_stub/routes.rb
cfoundry-4.7.1.rc1 lib/cc_api_stub/routes.rb
cfoundry-4.7.0 lib/cc_api_stub/routes.rb
cfoundry-4.6.3.rc3 lib/cc_api_stub/routes.rb
cfoundry-4.6.3.rc2 lib/cc_api_stub/routes.rb
cfoundry-4.6.3.rc1 lib/cc_api_stub/routes.rb
cfoundry-4.6.2 lib/cc_api_stub/routes.rb