aboutsummaryrefslogtreecommitdiffstats
path: root/test/visitors
diff options
context:
space:
mode:
Diffstat (limited to 'test/visitors')
-rw-r--r--test/visitors/test_mysql.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/visitors/test_mysql.rb b/test/visitors/test_mysql.rb
index 871d662d4b..8606dc39d4 100644
--- a/test/visitors/test_mysql.rb
+++ b/test/visitors/test_mysql.rb
@@ -22,6 +22,13 @@ module Arel
sql = @visitor.accept(stmt)
sql.must_be_like "SELECT FROM DUAL"
end
+
+ it 'uses FOR UPDATE when locking' do
+ stmt = Nodes::SelectStatement.new
+ stmt.lock = Nodes::Lock.new
+ sql = @visitor.accept(stmt)
+ sql.must_be_like "SELECT FROM DUAL FOR UPDATE"
+ end
end
end
end