Sha256: ab99bfe197bc03cb88ba80b7ba599a597e7d06bb20d77ab657a1bbc84ad29918

Contents?: true

Size: 487 Bytes

Versions: 2

Compression:

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

2 entries across 2 versions & 1 rubygems

Version Path
ibm_db-3.0.5-x86-mingw32 test/cases/type/unsigned_integer_test.rb
ibm_db-3.0.5 test/cases/type/unsigned_integer_test.rb