From 4018b5d66a810a34273d4b198688896f6f7459f3 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 6 Dec 2010 20:26:08 -0800 Subject: quoting limit nodes --- test/visitors/test_mysql.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/visitors/test_mysql.rb') diff --git a/test/visitors/test_mysql.rb b/test/visitors/test_mysql.rb index 8606dc39d4..135348580d 100644 --- a/test/visitors/test_mysql.rb +++ b/test/visitors/test_mysql.rb @@ -17,6 +17,12 @@ module Arel sql.must_be_like "SELECT FROM DUAL LIMIT 18446744073709551615 OFFSET 1" end + it "should escape LIMIT" do + sc = Arel::Nodes::UpdateStatement.new + sc.limit = "omg" + assert_match(/LIMIT 'omg'/, @visitor.accept(sc)) + end + it 'uses DUAL for empty from' do stmt = Nodes::SelectStatement.new sql = @visitor.accept(stmt) -- cgit v1.2.3