Closed KDGundermann closed 1 year ago
debug stepping through the test leads to :
# activerecord-ssqlserver-adapter-7.0.0.0/lib/active_record/connection_adapter/sqlserver/type/data.rb
def eql?(other)
self.class == other.class && value == other.value
end
where self.class => ActiveRecord::ConnectionAdapters::SQLServer::Type::Data with value "A" and other.class => String with value "A"
so its failing on self.class == other.class
Issue
Migrating my old application to Rails 7 my tests fails on accessing the enum columns
Expected behavior
When accessing an enum column which is defined as:
enum orderstate: { open: "O", closed: "C" }
either order.open? or order.closed? should be truthyActual behavior
accessing an enum column always return false
How to reproduce
ActiveRecord Enum Test
Details
FreeTDS details: