Sha256: 5c9622dd8a310ff32e97f257a0238cff75d0115ae5f32a48cd5d7271f8f9a174

Contents?: true

Size: 581 Bytes

Versions: 15

Compression:

Stored size: 581 Bytes

Contents

require 'test_helper'

module ActiveModel
  class Serializer
    class Adapter
      class NullTest < Minitest::Test
        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
end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
cm-active_model_serializers-0.10.0.rc1.1 test/adapter/null_test.rb
active_model_serializers-0.10.0.rc3 test/adapter/null_test.rb
cheap_ams-0.10.11 test/adapter/null_test.rb
cheap_ams-0.10.10 test/adapter/null_test.rb
cheap_ams-0.10.8 test/adapter/null_test.rb
cheap_ams-0.10.7 test/adapter/null_test.rb
cheap_ams-0.10.6 test/adapter/null_test.rb
cheap_ams-0.10.5 test/adapter/null_test.rb
cheap_ams-0.10.4 test/adapter/null_test.rb
cheap_ams-0.10.3 test/adapter/null_test.rb
cheap_ams-0.10.2 test/adapter/null_test.rb
cheap_ams-0.10.1 test/adapter/null_test.rb
cheap_ams-0.10.0.rc2 test/adapter/null_test.rb
active_model_serializers-0.10.0.rc2 test/adapter/null_test.rb
active_model_serializers-0.10.0.rc1 test/adapter/null_test.rb