Sha256: 99bf40a43f3383bcd15e02983ee6a7ef14fb9a3ad6cda0ffe72df15bf9b53168
Contents?: true
Size: 606 Bytes
Versions: 9
Compression:
Stored size: 606 Bytes
Contents
class Zendesk2::Client class Real def get_organization_by_external_id(external_id) request( :method => :get, :params => { external_id: external_id }, :path => "/organizations/search.json", ) end end # Real class Mock def get_organization_by_external_id(external_id) collection = self.data[:organizations] results = collection.select { |k,v| v["external_id"].to_s == external_id.to_s }.values response( :path => "/organizations/search.json", :body => {"organizations" => results}, ) end end # Mock end
Version data entries
9 entries across 9 versions & 1 rubygems