Sha256: 371b0f58c10caa90839f66f64400bc166bd75964d22f77384e9cd8b390386655
Contents?: true
Size: 531 Bytes
Versions: 6
Compression:
Stored size: 531 Bytes
Contents
require 'test_helper' module ActiveModel class Serializer class RootTest < Minitest::Test 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
6 entries across 6 versions & 1 rubygems