Skip to content

Commit 8e3fd5b

Browse files
committed
Fix relations_test override
It has to be namespaced under the CockroachDB module
1 parent 0823821 commit 8e3fd5b

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

test/cases/relations_test.rb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
require "models/post"
55
require "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
1618
end

0 commit comments

Comments
 (0)