Sha256: 73e36c1cb12ffb3d8959d10971b2617b99dc61c165e20b1e3f140b95ea4b7f11

Contents?: true

Size: 452 Bytes

Versions: 6

Compression:

Stored size: 452 Bytes

Contents

require "cases/helper"
require 'models/person'

module ActiveRecord
  class CustomLockingTest < ActiveRecord::TestCase
    fixtures :people

    def test_custom_lock
      if current_adapter?(:Mysql2Adapter)
        assert_match 'SHARE MODE', Person.lock('LOCK IN SHARE MODE').to_sql
        assert_sql(/LOCK IN SHARE MODE/) do
          Person.all.merge!(:lock => 'LOCK IN SHARE MODE').find(1)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ibm_db-5.2.0-x86-mingw32 test/cases/custom_locking_test.rb
ibm_db-5.1.0-x86-mingw32 test/cases/custom_locking_test.rb
ibm_db-5.0.5-x86-mingw32 test/cases/custom_locking_test.rb
ibm_db-5.0.4-x86-mingw32 test/cases/custom_locking_test.rb
ibm_db-5.0.3-x86-mingw32 test/cases/custom_locking_test.rb
ibm_db-5.0.2-x86-mingw32 test/cases/custom_locking_test.rb