File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 44require "models/post"
55require "models/comment"
66
7- class RelationTest < ActiveRecord ::TestCase
8- fixtures :posts , :comments
7+ module CockroachDB
8+ class RelationTest < ActiveRecord ::TestCase
9+ fixtures :posts , :comments
910
10- def test_finding_with_subquery_with_eager_loading_in_from
11- relation = Comment . includes ( :post ) . where ( "posts.type" : "Post" ) . order ( :id )
12- assert_equal relation . to_a , Comment . select ( "*" ) . from ( relation ) . order ( :id ) . to_a
13- assert_equal relation . to_a , Comment . select ( "subquery.*" ) . from ( relation ) . order ( :id ) . to_a
14- assert_equal relation . to_a , Comment . select ( "a.*" ) . from ( relation , :a ) . order ( :id ) . to_a
11+ def test_finding_with_subquery_with_eager_loading_in_from
12+ relation = Comment . includes ( :post ) . where ( "posts.type" : "Post" ) . order ( :id )
13+ assert_equal relation . to_a , Comment . select ( "*" ) . from ( relation ) . order ( :id ) . to_a
14+ assert_equal relation . to_a , Comment . select ( "subquery.*" ) . from ( relation ) . order ( :id ) . to_a
15+ assert_equal relation . to_a , Comment . select ( "a.*" ) . from ( relation , :a ) . order ( :id ) . to_a
16+ end
1517 end
1618end
You can’t perform that action at this time.
0 commit comments