Sha256: 51e8b3b86595721444cb8b6acfa1319edc1e3c040b44d72ef71c8dd3491071c8
Contents?: true
Size: 510 Bytes
Versions: 1
Compression:
Stored size: 510 Bytes
Contents
class FleetAPI::Client class Real def create_unit(params={}) name = params["name"] request( :body => params, :method => 'PUT', :path => "v1-alpha/units/#{name}", ) end end class Mock def create_unit(params={}) params['machineID'] = FleetAPI::Mock.random_id self.data[:units][params['name']] = params response( :body => {"unit" => self.data[:units][params['name']]}, :status => 200, ) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
coreos-fleet-api-0.1.0 | lib/fleet_api/requests/create_unit.rb |