Sha256: a9da299650ef4a62f71db4cc612fd72a8963b2f6c08a43ab2647473a4156f038

Contents?: true

Size: 479 Bytes

Versions: 4

Compression:

Stored size: 479 Bytes

Contents

# frozen_string_literal: true

require "cases/helper"

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

      test "minus value is out of range" do
        assert_raises(ActiveModel::RangeError) do
          UnsignedInteger.new.serialize(-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/type/unsigned_integer_test.rb
ibm_db-5.4.1-x86-mingw32 test/cases/type/unsigned_integer_test.rb
ibm_db-5.4.0-x86-mingw32 test/cases/type/unsigned_integer_test.rb
ibm_db-5.3.2-x86-mingw32 test/cases/type/unsigned_integer_test.rb