blob: 026cb08a067607aaf0f4b28767826ea59cb7675d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
require "cases/helper"
require "active_model/type"
module ActiveModel
module Type
class UnsignedIntegerTest < ActiveModel::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
|