lib/zendesk2/client/mock.rb in zendesk2-1.3.1 vs lib/zendesk2/client/mock.rb in zendesk2-1.3.2

- old
+ new

@@ -88,10 +88,10 @@ page_params = Zendesk2.paging_parameters(params) page_size = (page_params["per_page"] || 50).to_i page_index = (page_params["page"] || 1).to_i offset = (page_index - 1) * page_size filter = options[:filter] - resources = self.data[collection].values + resources = options[:resources] || self.data[collection].values resources = filter.call(resources) if filter count = resources.size total_pages = (count / page_size) + 1 next_page = if page_index < total_pages