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