Skip to content

Commit 6aa992d

Browse files
committed
Coerce tests as SQL Server does not return string value for updated_at
1 parent 7026eb5 commit 6aa992d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/cases/coerced_tests.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,19 @@ class CollectionCacheKeyTest < ActiveRecord::TestCase
11631163

11641164

11651165

1166+
module ActiveRecord
1167+
class CacheKeyTest < ActiveRecord::TestCase
1168+
# Like Mysql2 and PostgreSQL, SQL Server doesn't return a string value for updated_at. In the Rails tests
1169+
# the tests are skipped if adapter is Mysql2 or PostgreSQL.
1170+
coerce_tests! %r{cache_version is the same when it comes from the DB or from the user}
1171+
coerce_tests! %r{cache_version does NOT call updated_at when value is from the database}
1172+
coerce_tests! %r{cache_version does not truncate zeros when timestamp ends in zeros}
1173+
end
1174+
end
1175+
1176+
1177+
1178+
11661179
require "models/book"
11671180
module ActiveRecord
11681181
class StatementCacheTest < ActiveRecord::TestCase

0 commit comments

Comments
 (0)