e12f9c4951
Fixes a bug where Model#import does not work when a model's primary key has no associated 'sequence' in the database. If a value for the primary key is specified, then the insert should not require a database 'sequence' to generate a value for that primary key field.
18 lines
380 B
Ruby
18 lines
380 B
Ruby
Factory.define :group do |m|
|
|
m.sequence(:order) { |n| "Order #{n}" }
|
|
end
|
|
|
|
Factory.define :invalid_topic, :class => "Topic" do |m|
|
|
m.sequence(:title){ |n| "Title #{n}"}
|
|
m.author_name nil
|
|
end
|
|
|
|
Factory.define :topic do |m|
|
|
m.sequence(:title){ |n| "Title #{n}"}
|
|
m.sequence(:author_name){ |n| "Author #{n}"}
|
|
end
|
|
|
|
Factory.define :widget do |m|
|
|
m.sequence(:w_id){ |n| n}
|
|
end
|