debian-mirror-gitlab/elasticsearch-model/test/unit/serializing_test.rb
2019-12-22 22:52:31 +05:30

17 lines
398 B
Ruby

require 'test_helper'
class Elasticsearch::Model::SerializingTest < Test::Unit::TestCase
context "Serializing module" do
class DummyClass
include Elasticsearch::Model::Serializing::InstanceMethods
def as_json(options={})
'HASH'
end
end
should "delegate to as_json by default" do
assert_equal 'HASH', DummyClass.new.as_indexed_json
end
end
end