Updating import_test to be Ruby 1.9.2 compatible. Ruby 1.9.1 changed the Date.parse capabilities to no longer support MM/DD/YYYY functionality so we only test against YYYY/MM/DD.
[fixes https://github.com/zdennis/activerecord-import/issues/19]
This commit is contained in:
parent
e079e19a29
commit
5b3740e0f2
|
@ -234,14 +234,9 @@ describe "#import" do
|
|||
end
|
||||
|
||||
context "importing a datetime field" do
|
||||
it "should import a date with MM/DD/YYYY format just fine" do
|
||||
Topic.import [:author_name, :title, :last_read], [["Bob Jones", "Topic 1", "05/14/2010"]]
|
||||
assert_equal "05/14/2010".to_date, Topic.last.last_read.to_date
|
||||
end
|
||||
|
||||
it "should import a date with YYYY/MM/DD format just fine" do
|
||||
Topic.import [:author_name, :title, :last_read], [["Bob Jones", "Topic 2", "2010/05/14"]]
|
||||
assert_equal "05/14/2010".to_date, Topic.last.last_read.to_date
|
||||
assert_equal "2010/05/14".to_date, Topic.last.last_read.to_date
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue