Sha256: 1dd4f525a66e56628e73f518a205a2917ec63e33371d419b6fcf79068e77dd9d
Contents?: true
Size: 533 Bytes
Versions: 2
Compression:
Stored size: 533 Bytes
Contents
require 'test_helper' module ActiveModelSerializers class ModelTest < ActiveSupport::TestCase include ActiveModel::Serializer::Lint::Tests def setup @resource = ActiveModelSerializers::Model.new end def test_initialization_with_string_keys klass = Class.new(ActiveModelSerializers::Model) do attr_accessor :key end value = 'value' model_instance = klass.new('key' => value) assert_equal model_instance.read_attribute_for_serialization(:key), value end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_model_serializers-0.10.4 | test/active_model_serializers/model_test.rb |
active_model_serializers-0.10.3 | test/active_model_serializers/model_test.rb |