Sha256: dcf19e159b1458f0463e869c7eb180aa31155c91d9d9c076b2c9b7575251e4a2
Contents?: true
Size: 893 Bytes
Versions: 18
Compression:
Stored size: 893 Bytes
Contents
class Ey::Core::Client class Real def reconcile_server(params={}) id = params["id"] url = params["url"] request( :method => :put, :path => "servers/#{id}/reconcile", :url => url, ) end end # Real class Mock def reconcile_server(params={}) request_id = self.uuid identity = resource_identity(params) find(:servers, identity) reconcile_request = { "finished_at" => Time.now, "id" => request_id, "started_at" => Time.now, "successful" => "true", "server" => url_for("/servers/#{identity}"), "type" => "reconcile_server_request", } self.data[:requests][request_id] = reconcile_request response( :body => {"request" => reconcile_request}, :status => 201, ) end end # Mock end
Version data entries
18 entries across 18 versions & 2 rubygems