Sha256: dbf46049f97f42c43f8ca59bc307f45cc9a3d48cc9a8143fe6a818d2bfaafe33

Contents?: true

Size: 469 Bytes

Versions: 10

Compression:

Stored size: 469 Bytes

Contents

require "cases/helper"
require "models/company"

module ActiveRecord
  module Type
    class UnsignedIntegerTest < ActiveRecord::TestCase
      test "unsigned int max value is in range" do
        assert_equal(4294967295, UnsignedInteger.new.type_cast_for_database(4294967295))
      end

      test "minus value is out of range" do
        assert_raises(::RangeError) do
          UnsignedInteger.new.type_cast_for_database(-1)
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
ibm_db-3.0.4-x86-mingw32 test/cases/type/unsigned_integer_test.rb
ibm_db-3.0.4 test/cases/type/unsigned_integer_test.rb
ibm_db-3.0.3-x86-mingw32 test/cases/type/unsigned_integer_test.rb
ibm_db-3.0.3 test/cases/type/unsigned_integer_test.rb
ibm_db-3.0.2-x86-mingw32 test/cases/type/unsigned_integer_test.rb
ibm_db-3.0.2 test/cases/type/unsigned_integer_test.rb
activejob-lock-0.0.2 rails/activerecord/test/cases/type/unsigned_integer_test.rb
ibm_db-3.0.1 test/cases/type/unsigned_integer_test.rb
ibm_db-3.0.1-x86-mingw32 test/cases/type/unsigned_integer_test.rb
activejob-lock-0.0.1 rails/activerecord/test/cases/type/unsigned_integer_test.rb