Sha256: 26c003da5ff4777b1cfe2ae18e7e893c90f69a2042908ba0b4aff6e7b9b66e1c
Contents?: true
Size: 509 Bytes
Versions: 2
Compression:
Stored size: 509 Bytes
Contents
require 'test_helper' module ActiveModel class DefaultSerializer class Test < ActiveRecord::TestCase def test_serialize_objects assert_equal(nil, DefaultSerializer.new(nil).serializable_hash) assert_equal(1, DefaultSerializer.new(1).serializable_hash) assert_equal('hi', DefaultSerializer.new('hi').serializable_hash) obj = Struct.new(:a, :b).new(1, 2) assert_equal({ a: 1, b: 2 }, DefaultSerializer.new(obj).serializable_hash) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems