aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/type/binary_test.rb
blob: b04b59f8dd8520914cf81987e2dbf4dbf0e4a602 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

require "cases/helper"

module ActiveModel
  module Type
    class BinaryTest < ActiveSupport::TestCase
      def test_type_cast_binary
        type = Type::Binary.new
        assert_nil type.cast(nil)
        assert_equal "1", type.cast("1")
        assert_equal 1, type.cast(1)
      end
    end
  end
end