Sha256: 3170d1000d4a299e23eec62bf218d1464e78920077679fa324f246db9819a3f4

Contents?: true

Size: 435 Bytes

Versions: 8

Compression:

Stored size: 435 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

8 entries across 8 versions & 1 rubygems

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