Sha256: f27242311de7971fb5b54560110f6e61e96ebbbe9ce7e7ea1e93a7ceeb8cd492
Contents?: true
Size: 1.17 KB
Versions: 2
Compression:
Stored size: 1.17 KB
Contents
# Need way to find way to stub current_user and RoleMapper in order to run these tests require File.expand_path( File.join( File.dirname(__FILE__),'..','spec_helper') ) describe Hydra::CommonModsIndexMethods do describe "extract_person_full_names" do it "should return an array of Solr::Field objects for :person_full_name_facet" do ma = ModsAsset.find("hydrangea:fixture_mods_article1") full_names = ma.datastreams["descMetadata"].extract_person_full_names full_names.should be_kind_of Hash full_names["person_full_name_facet"].should == ["FAMILY NAME, GIVEN NAMES", "Lacks, Henrietta"] end end describe "extract_person_organizations" do it "should return an array of Solr::Field objects for :mods_organization_facet" do orgs = ModsAsset.find("hydrangea:fixture_mods_article1").datastreams["descMetadata"].extract_person_organizations orgs.should be_kind_of Hash orgs["mods_organization_facet"].should be_kind_of Array orgs["mods_organization_facet"].length.should == 2 orgs["mods_organization_facet"].first.should == "FACULTY, UNIVERSITY" orgs["mods_organization_facet"].last.should == "Baltimore" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hydra-head-4.0.0.rc2 | test_support/spec/lib/common_mods_index_methods_spec.rb |
hydra-head-3.3.0 | test_support/spec/lib/common_mods_index_methods_spec.rb |