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