aboutsummaryrefslogtreecommitdiffstats
path: root/test/visitors/test_oracle.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-08-26 08:48:09 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-08-26 08:48:09 -0700
commit2aac990e4d68cc3cbf86ecc9565723b07f22c962 (patch)
treeef905cfffe43295268b7dc963a4b263b1598ce6a /test/visitors/test_oracle.rb
parent83a5d4d4e37a2c72824315597cb8b737f37b7960 (diff)
parentbca49f4e5beaa135a9b96270426968793550b708 (diff)
downloadrails-2aac990e4d68cc3cbf86ecc9565723b07f22c962.tar.gz
rails-2aac990e4d68cc3cbf86ecc9565723b07f22c962.tar.bz2
rails-2aac990e4d68cc3cbf86ecc9565723b07f22c962.zip
Merge pull request #77 from ebeigarts/master
Support locking in Oracle
Diffstat (limited to 'test/visitors/test_oracle.rb')
-rw-r--r--test/visitors/test_oracle.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/visitors/test_oracle.rb b/test/visitors/test_oracle.rb
index b53690a1a8..9a5fa304ab 100644
--- a/test/visitors/test_oracle.rb
+++ b/test/visitors/test_oracle.rb
@@ -143,6 +143,13 @@ module Arel
( SELECT * FROM users WHERE age > 10 MINUS SELECT * FROM users WHERE age > 20 )
}
end
+
+ describe 'locking' do
+ it 'defaults to FOR UPDATE when locking' do
+ node = Nodes::Lock.new(Arel.sql('FOR UPDATE'))
+ @visitor.accept(node).must_be_like "FOR UPDATE"
+ end
+ end
end
end
end