Sha256: 12b3440264e5b3bb64032535001b043a8cdafd073b9ae64fcd898cc269fbfb76

Contents?: true

Size: 460 Bytes

Versions: 6

Compression:

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

6 entries across 6 versions & 2 rubygems

Version Path
ibm_db-5.5.0 test/cases/type/unsigned_integer_test.rb
ibm_db-5.4.1 test/cases/type/unsigned_integer_test.rb
ibm_db-5.4.0 test/cases/type/unsigned_integer_test.rb
ibm_db-5.3.2 test/cases/type/unsigned_integer_test.rb
ibm_db-5.3.1 test/cases/type/unsigned_integer_test.rb
ruby-on-quails-0.1.0 activerecord/test/cases/type/unsigned_integer_test.rb