Updating tests around working with non-standard ActiveRecord models with non-sequence based primary keys.

* move into test/import_test so it runs across all supported adapters

[#60]
This commit is contained in:
Zach Dennis 2012-08-06 09:23:01 -04:00
parent 71a393d000
commit b500ebe5a1
3 changed files with 13 additions and 5 deletions

View file

@ -19,6 +19,16 @@ describe "#import" do
end
end
describe "with non-default ActiveRecord models" do
context "that have a non-standard primary key (that is no sequence)" do
it "should import models successfully" do
assert_difference "Widget.count", +3 do
Widget.import Build(3, :widgets)
end
end
end
end
context "with :validation option" do
let(:columns) { %w(title author_name) }
let(:valid_values) { [[ "LDAP", "Jerry Carter"], ["Rails Recipes", "Chad Fowler"]] }