aboutsummaryrefslogtreecommitdiffstats
path: root/test/visitors/test_to_sql.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/visitors/test_to_sql.rb')
-rw-r--r--test/visitors/test_to_sql.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb
index b9d6c78e62..09f037f75f 100644
--- a/test/visitors/test_to_sql.rb
+++ b/test/visitors/test_to_sql.rb
@@ -96,7 +96,7 @@ module Arel
end
it "should visit visit_Arel_Attributes_Time" do
- attr = Attributes::Time.new(@attr.relation, @attr.name, @attr.column)
+ attr = Attributes::Time.new(@attr.relation, @attr.name)
@visitor.accept attr
end
@@ -155,7 +155,9 @@ module Arel
end
in_node = Nodes::In.new @attr, %w{ a b c }
visitor = visitor.new(Table.engine)
- visitor.expected = @attr.column
+ visitor.expected = Table.engine.connection.columns(:users).find { |x|
+ x.name == 'name'
+ }
visitor.accept(in_node).must_equal %("users"."name" IN ('a', 'b', 'c'))
end
end
@@ -201,7 +203,9 @@ module Arel
end
in_node = Nodes::NotIn.new @attr, %w{ a b c }
visitor = visitor.new(Table.engine)
- visitor.expected = @attr.column
+ visitor.expected = Table.engine.connection.columns(:users).find { |x|
+ x.name == 'name'
+ }
visitor.accept(in_node).must_equal %("users"."name" NOT IN ('a', 'b', 'c'))
end
end