Skip to content

Commit ed243bf

Browse files
committed
Coerce query cache tests since SQL Server returns Fixnum for count.
1 parent b249e16 commit ed243bf

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
require 'cases/sqlserver_helper'
2+
require 'models/task'
3+
4+
class QueryCacheTestSqlserver < ActiveRecord::TestCase
5+
end
6+
7+
class QueryCacheTest < ActiveRecord::TestCase
8+
9+
COERCED_TESTS = [:test_cache_does_not_wrap_string_results_in_arrays]
10+
11+
include SqlserverCoercedTest
12+
13+
fixtures :tasks
14+
15+
16+
def test_coerced_test_cache_does_not_wrap_string_results_in_arrays
17+
Task.cache do
18+
assert_instance_of Fixnum, Task.connection.select_value("SELECT count(*) AS count_all FROM tasks")
19+
end
20+
end
21+
22+
end
23+
24+

0 commit comments

Comments
 (0)