Sha256: a104cd5cdeb038cc164f4f7fd39860460d33643dc5e2325ec106be42ec03e6bf

Contents?: true

Size: 542 Bytes

Versions: 10

Compression:

Stored size: 542 Bytes

Contents

require 'test_helper'

module ActiveModelSerializers
  module Adapter
    class NullTest < ActiveSupport::TestCase
      def setup
        profile = Profile.new(name: 'Name 1', description: 'Description 1', comments: 'Comments 1')
        serializer = ProfileSerializer.new(profile)

        @adapter = Null.new(serializer)
      end

      def test_serializable_hash
        assert_equal({}, @adapter.serializable_hash)
      end

      def test_it_returns_empty_json
        assert_equal('{}', @adapter.to_json)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
active_model_serializers-0.10.8 test/adapter/null_test.rb
active_model_serializers-0.10.7 test/adapter/null_test.rb
active_model_serializers-0.10.6 test/adapter/null_test.rb
active_model_serializers-0.10.5 test/adapter/null_test.rb
active_model_serializers-0.10.4 test/adapter/null_test.rb
agi_active_model_serializers-0.10.9 test/adapter/null_test.rb
agi_active_model_serializers-0.10.8 test/adapter/null_test.rb
agi_active_model_serializers-0.10.7 test/adapter/null_test.rb
active_model_serializers-0.10.3 test/adapter/null_test.rb
active_model_serializers-0.10.2 test/adapter/null_test.rb