aboutsummaryrefslogtreecommitdiffstats
path: root/test/visitors/test_postgres.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/visitors/test_postgres.rb')
-rw-r--r--test/visitors/test_postgres.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/visitors/test_postgres.rb b/test/visitors/test_postgres.rb
index 618745c35d..b98f78ca12 100644
--- a/test/visitors/test_postgres.rb
+++ b/test/visitors/test_postgres.rb
@@ -12,6 +12,14 @@ module Arel
FOR UPDATE
}
end
+
+ it "should escape LIMIT" do
+ sc = Arel::Nodes::SelectStatement.new
+ sc.limit = "omg"
+ sc.cores.first.projections << 'DISTINCT ON'
+ sc.orders << "xyz"
+ assert_match(/LIMIT 'omg'/, @visitor.accept(sc))
+ end
end
end
end