Importing an empty array of objects/values should be supported

This commit is contained in:
Franck Verrot 2011-03-14 09:56:51 +01:00 committed by Zach Dennis
parent 2517770a38
commit d901a7c60f
2 changed files with 10 additions and 0 deletions

View file

@ -12,6 +12,13 @@ describe "#import" do
end
end
it "should not produce an error when importing empty arrays" do
assert_nothing_raised do
Topic.import []
Topic.import %w(title author_name), []
end
end
context "with :validation option" do
let(:columns) { %w(title author_name) }
let(:valid_values) { [[ "LDAP", "Jerry Carter"], ["Rails Recipes", "Chad Fowler"]] }