Sha256: 0fd41e357fdb76af2c4bbcc06326bc35144bfceea0ece51196cad09a1d7def45
Contents?: true
Size: 787 Bytes
Versions: 19
Compression:
Stored size: 787 Bytes
Contents
class Zendesk2::Client class Real def get_user_identity(params={}) id = params["id"] user_id = params["user_id"] path = "/users/#{user_id}/identities/#{id}.json" request(:path => path) end end # Real class Mock def get_user_identity(params={}) id = params["id"] user_id = params["user_id"] path = "/users/#{user_id}/identities/#{id}.json" if body = self.data[:identities][id] response( :path => path, :body => { "identity" => body }, ) else response( :path => path, :status => 404, :body => {"error" => "RecordNotFound", "description" => "Not found"}, ) end end end # Mock end
Version data entries
19 entries across 19 versions & 1 rubygems