spec/support/solr_document.rb in hydra-access-controls-6.5.2 vs spec/support/solr_document.rb in hydra-access-controls-7.0.0.pre1
- old
+ new
@@ -1,9 +1,14 @@
class SolrDocument
def initialize(source_doc={}, solr_response=nil)
@source_doc = source_doc
end
- def fetch(field, default)
+
+ def id
+ fetch(:id)
+ end
+
+ def fetch(field, default = nil)
@source_doc[field]
end
def [](field)
@source_doc[field]