Sha256: 09470b37dcb83f6368f689e751354a57bf3382c9227ac1e71051a64377975b6a
Contents?: true
Size: 591 Bytes
Versions: 1
Compression:
Stored size: 591 Bytes
Contents
require 'test_helper' module ActiveModel class Serializer class Association class BuildSerializerTest < ActiveModel::TestCase def setup @association = Association::HasOne.new('post', serializer: PostSerializer) @post = Post.new({ title: 'Title 1', body: 'Body 1', date: '1/1/2000' }) end def test_build_serializer_for_array_called_twice 2.times do serializer = @association.build_serializer(@post) assert_instance_of(PostSerializer, serializer) end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_model_serializers-0.9.0.alpha1 | test/unit/active_model/serializer/associations/build_serializer_test.rb |