Sha256: 987bb7692a9ea1bcb92fff5406701727fa5819147cf833cf10d3f70d02db4175

Contents?: true

Size: 482 Bytes

Versions: 4

Compression:

Stored size: 482 Bytes

Contents

# frozen_string_literal: true

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

4 entries across 4 versions & 1 rubygems

Version Path
ibm_db-5.5.0-x86-mingw32 test/cases/custom_locking_test.rb
ibm_db-5.4.1-x86-mingw32 test/cases/custom_locking_test.rb
ibm_db-5.4.0-x86-mingw32 test/cases/custom_locking_test.rb
ibm_db-5.3.2-x86-mingw32 test/cases/custom_locking_test.rb