test/schema.rb in mrkurt-versioned-0.1.0 vs test/schema.rb in mrkurt-versioned-0.1.1
- old
+ new
@@ -30,7 +30,26 @@
def set_revision
write_attribute :revision, (Time.now.to_f * 1000).ceil
end
end
+class LockableUser
+ include MongoMapper::Document
+ include Versioned
+ locking!
+
+ key :name, String
+ key :required_field, String
+ validates_presence_of :required_field
+end
+
+class UnversionedLockableUser
+ include MongoMapper::Document
+ extend Versioned::ClassMethods
+ locking!
+
+ key :name, String
+end
+
User.destroy_all
+Loser.destroy_all
Version.destroy_all