File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,21 +10,21 @@ class OptimizerHitsTestSQLServer < ActiveRecord::TestCase
10
10
assert_queries_match ( %r{\A SELECT .+ FROM .+ OPTION \( HASH GROUP\) \z } ) do
11
11
companies = Company . optimizer_hints ( "HASH GROUP" )
12
12
companies = companies . distinct . select ( "firm_id" )
13
- assert_includes companies . explain , "| Hash Match | Aggregate |"
13
+ assert_includes companies . explain . inspect , "| Hash Match | Aggregate |"
14
14
end
15
15
16
16
assert_queries_match ( %r{\A SELECT .+ FROM .+ OPTION \( ORDER GROUP\) \z } ) do
17
17
companies = Company . optimizer_hints ( "ORDER GROUP" )
18
18
companies = companies . distinct . select ( "firm_id" )
19
- assert_includes companies . explain , "| Stream Aggregate | Aggregate |"
19
+ assert_includes companies . explain . inspect , "| Stream Aggregate | Aggregate |"
20
20
end
21
21
end
22
22
23
23
it "apply multiple optimizations" do
24
24
assert_queries_match ( %r{\A SELECT .+ FROM .+ OPTION \( HASH GROUP, FAST 1\) \z } ) do
25
25
companies = Company . optimizer_hints ( "HASH GROUP" , "FAST 1" )
26
26
companies = companies . distinct . select ( "firm_id" )
27
- assert_includes companies . explain , "| Hash Match | Flow Distinct |"
27
+ assert_includes companies . explain . inspect , "| Hash Match | Flow Distinct |"
28
28
end
29
29
end
30
30
You can’t perform that action at this time.
0 commit comments