Sha256: 37ce94a51e1c15cfebd32ca4e0d9ba80ef57638a05e3240143c2bd4470248404

Contents?: true

Size: 392 Bytes

Versions: 4

Compression:

Stored size: 392 Bytes

Contents

require 'test_helper'

module ActiveModel
  class Serializer
    class FieldsetTest < ActiveSupport::TestCase
      def test_fieldset_with_hash
        fieldset = ActiveModel::Serializer::Fieldset.new('post' => %w(id title), 'comment' => ['body'])
        expected = { :post => [:id, :title], :comment => [:body] }

        assert_equal(expected, fieldset.fields)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
active_model_serializers-0.10.1 test/serializers/fieldset_test.rb
active_model_serializers-0.10.0 test/serializers/fieldset_test.rb
active_model_serializers-0.10.0.rc5 test/serializers/fieldset_test.rb
active_model_serializers-0.10.0.rc4 test/serializers/fieldset_test.rb