mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-10 23:38:10 -05:00
Mongoid support cleanup
moving test specific == override part of the test models and not part of the Compatibility module included in all Mongoid docs. Made sure that nothing in devise itself uses this == between 2 different models, its purely for assert_equal
This commit is contained in:
@@ -34,10 +34,6 @@ module Devise
|
||||
end
|
||||
super(validate)
|
||||
end
|
||||
|
||||
def ==(other)
|
||||
other.is_a?(self.class) && _id == other._id
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -11,4 +11,9 @@ class Admin
|
||||
options.delete(:order) if options[:order] == "id"
|
||||
super options
|
||||
end
|
||||
|
||||
# overwrite equality (because some devise tests use this for asserting model equality)
|
||||
def ==(other)
|
||||
other.is_a?(self.class) && _id == other._id
|
||||
end
|
||||
end
|
||||
|
||||
@@ -13,4 +13,9 @@ class User
|
||||
options.delete(:order) if options[:order] == "id"
|
||||
super options
|
||||
end
|
||||
|
||||
# overwrite equality (because some devise tests use this for asserting model equality)
|
||||
def ==(other)
|
||||
other.is_a?(self.class) && _id == other._id
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user