active_model_serializers/test/attributes_test.rb
Steve Klabnik 729a823868 Getting started: attributes.
Super super basic collection of attributes. Nothing fancy.
2014-07-09 16:16:39 -04:00

19 lines
467 B
Ruby

require 'test_helper'
module ActiveModel
class Serializer
class AttributesTest < Minitest::Test
def setup
@profile = Profile.new({ name: 'Name 1', description: 'Description 1', comments: 'Comments 1' })
@profile_serializer = ProfileSerializer.new(@profile)
end
def test_attributes_definition
assert_equal([:name, :description],
@profile_serializer.class._attributes)
end
end
end
end