Sha256: 6bc6fe00590970ccb5fb1c596babd4a496aa2e27d30893d69ab681dc319edd8d

Contents?: true

Size: 475 Bytes

Versions: 43

Compression:

Stored size: 475 Bytes

Contents

require_relative '../helper'
require 'elasticsearch'

class OjSerializerTest < Test::Unit::TestCase
  def setup
    begin
      require 'fluent/plugin/oj_serializer'
    rescue LoadError
      omit "OjSerializer testcase needs oj gem."
    end
    @serializer = Fluent::Plugin::Serializer::Oj.new
  end

  def test_serializer
    data = {"message" => "Hi"}
    assert_equal data.to_json, @serializer.dump(data)
    assert_equal data, @serializer.load(data.to_json)
  end
end

Version data entries

43 entries across 43 versions & 2 rubygems

Version Path
fluent-plugin-elasticsearch-5.4.3 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.4.2 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.4.1 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.4.0 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.3.0 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.2.5 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.2.4 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.2.3 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.2.2 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.2.1 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.2.0 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.1.5 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.1.4 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.1.3 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.1.2 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.1.1 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.1.0 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.0.5 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.0.4 test/plugin/test_oj_serializer.rb
fluent-plugin-elasticsearch-5.0.3 test/plugin/test_oj_serializer.rb