提交 b3fcabb3 编写于 作者: A Aaron Patterson

adding a test case for custom locking

上级 442f8dbc
require "cases/helper"
require 'models/person'
module ActiveRecord
class CustomLockingTest < ActiveRecord::TestCase
fixtures :people
def test_custom_lock
if current_adapter?(:MysqlAdapter, :Mysql2Adapter)
assert_match 'SHARE MODE', Person.lock('LOCK IN SHARE MODE').to_sql
assert_sql(/LOCK IN SHARE MODE/) do
Person.find(1, :lock => 'LOCK IN SHARE MODE')
end
end
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册