Skip to content

Commit

Permalink
Rewriting tests to use proper ISO8601 dates
Browse files Browse the repository at this point in the history
  • Loading branch information
awead committed Nov 2, 2012
1 parent b9c659c commit 5882578
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions spec/fixtures/mods_articles/hydrangea_article1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</titleInfo>
<originInfo>
<publisher>PUBLISHER</publisher>
<dateIssued>DATE</dateIssued>
<dateIssued>2007-02-15</dateIssued>
</originInfo>
<identifier type="issn">0013-8908</identifier>
<part>
Expand All @@ -75,7 +75,7 @@
<start>195</start>
<end>230</end>
</extent>
<date>FEB. 2007</date>
<date>2007-02-01</date>
</part>
</relatedItem>

Expand Down
6 changes: 3 additions & 3 deletions spec/units/xml_terminology_based_solrizer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
solr_doc["topic_tag_t"].sort.should == ["CONTROLLED TERM", "TOPIC 1", "TOPIC 2"]

# These are a holdover from an old verison of OM
solr_doc['journal_0_issue_0_publication_date_dt'].should == ["FEB. 2007"]
solr_doc['journal_0_issue_0_publication_date_dt'].should == ["2007-02-01"]


end
Expand Down Expand Up @@ -89,14 +89,14 @@
unless RUBY_VERSION.match("1.8.7")
solr_doc = Hash.new
result = @mods_article.solrize_term(Samples::ModsArticle.terminology.retrieve_term(:pub_date), solr_doc)
solr_doc["pub_date_dt"].should == ["FEB. 2007"]
solr_doc["pub_date_dt"].should == ["2007-02-01"]
end
end

it "should add fields based on type using ref" do
solr_doc = Hash.new
result = @mods_article.solrize_term(Samples::ModsArticle.terminology.retrieve_term(:issue_date), solr_doc)
solr_doc["issue_date_dt"].should == ["DATE"]
solr_doc["issue_date_dt"].should == ["2007-02-15"]
end

it "shouldn't index terms where index_as is an empty array" do
Expand Down

0 comments on commit 5882578

Please sign in to comment.