Sha256: b57ec7989de8b3f006abd62fb5b6186b392714f84e8dafdfcb4c944d89908706
Contents?: true
Size: 536 Bytes
Versions: 10
Compression:
Stored size: 536 Bytes
Contents
require 'test_helper' module ActiveModel class Serializer class RootTest < ActiveSupport::TestCase def setup @virtual_value = VirtualValue.new(id: 1) end def test_overwrite_root serializer = VirtualValueSerializer.new(@virtual_value, root: 'smth') assert_equal('smth', serializer.json_key) end def test_underscore_in_root serializer = VirtualValueSerializer.new(@virtual_value) assert_equal('virtual_value', serializer.json_key) end end end end
Version data entries
10 entries across 10 versions & 2 rubygems