Sha256: 079bb1215db9e9e9626f09432bf5ff28963bd793cb89d3cbc9211803e7963773
Contents?: true
Size: 736 Bytes
Versions: 9
Compression:
Stored size: 736 Bytes
Contents
class Zendesk2::Client class Real def create_category(params={}) request( :body => {"category" => params}, :method => :post, :path => "/categories.json", ) end end # Real class Mock def create_category(params={}) identity = self.class.new_id record = { "id" => identity, "url" => url_for("/categories/#{identity}.json"), "created_at" => Time.now.iso8601, "updated_at" => Time.now.iso8601, }.merge(params) self.data[:categories][identity] = record response( :method => :post, :body => {"category" => record}, :path => "/categories.json" ) end end # Mock end
Version data entries
9 entries across 9 versions & 1 rubygems