Sha256: e5620cdf20c0a1c0a3f3aadc5e74760fc56643cfc3a45bec5352dbd506f8d54a
Contents?: true
Size: 758 Bytes
Versions: 26
Compression:
Stored size: 758 Bytes
Contents
class Zendesk2::Client class Real def get_topic_comment(params={}) id = params["id"] topic_id = params["topic_id"] path = "/topics/#{topic_id}/comments/#{id}.json" request( :method => :get, :path => path, ) end end # Real class Mock def get_topic_comment(params={}) id = params["id"] topic_id = params["topic_id"] unless (topic_comment = self.find!(:topic_comments, id)) && topic_comment["topic_id"] == topic_id error!(:not_found) else response( :path => "/topics/#{topic_id}/comments/#{id}.json", :body => { "topic_comment" => topic_comment, }, ) end end end # Mock end
Version data entries
26 entries across 26 versions & 1 rubygems