Kouhei Sutou
null+****@clear*****
Tue Apr 9 19:07:49 JST 2013
Kouhei Sutou 2013-04-09 19:07:49 +0900 (Tue, 09 Apr 2013) New Revision: fec0409d2bdb86a59f4d0e5f41be478f1380c1c0 https://github.com/groonga/fluent-plugin-droonga/commit/fec0409d2bdb86a59f4d0e5f41be478f1380c1c0 Message: Unindent Modified files: test/plugin/test_handler_search.rb Modified: test/plugin/test_handler_search.rb (+64 -64) =================================================================== --- test/plugin/test_handler_search.rb 2013-04-09 19:07:35 +0900 (b38f8b4) +++ test/plugin/test_handler_search.rb 2013-04-09 19:07:49 +0900 (e38b5b3) @@ -148,77 +148,77 @@ class SearchHandlerTest < Test::Unit::TestCase end class AttributesTest < self - def test_source_only - expected = { + def test_source_only + expected = { + "sections-result" => { + "records" => [ + { + "_key" => "1.1", + "title" => "Groonga overview", + }, + { + "_key" => "1.2", + "title" => "Full text search and Instant update", + }, + { + "_key" => "1.3", + "title" => "Column store and aggregate query", + }, + ], + }, + } + request = { + "queries" => { "sections-result" => { - "records" => [ - { - "_key" => "1.1", - "title" => "Groonga overview", - }, - { - "_key" => "1.2", - "title" => "Full text search and Instant update", - }, - { - "_key" => "1.3", - "title" => "Column store and aggregate query", - }, - ], - }, - } - request = { - "queries" => { - "sections-result" => { - "source" => "Sections", - "output" => { - "limit" => 3, - "attributes" => ["_key", "title"], - }, + "source" => "Sections", + "output" => { + "limit" => 3, + "attributes" => ["_key", "title"], }, }, - } - assert_search(expected, request) - end + }, + } + assert_search(expected, request) + end - def test_label - expected = { + def test_label + expected = { + "sections-result" => { + "records" => [ + { + "key" => "1.1", + "title" => "Groonga overview", + }, + { + "key" => "1.2", + "title" => "Full text search and Instant update", + }, + { + "key" => "1.3", + "title" => "Column store and aggregate query", + }, + ], + }, + } + request = { + "queries" => { "sections-result" => { - "records" => [ - { - "key" => "1.1", - "title" => "Groonga overview", - }, - { - "key" => "1.2", - "title" => "Full text search and Instant update", - }, - { - "key" => "1.3", - "title" => "Column store and aggregate query", - }, - ], - }, - } - request = { - "queries" => { - "sections-result" => { - "source" => "Sections", - "output" => { - "limit" => 3, - "attributes" => [ - { - "label" => "key", - "source" => "_key", - }, - "title", - ], - }, + "source" => "Sections", + "output" => { + "limit" => 3, + "attributes" => [ + { + "label" => "key", + "source" => "_key", + }, + "title", + ], }, }, - } - assert_search(expected, request) - end + }, + } + assert_search(expected, request) + end end end end -------------- next part -------------- HTML����������������������������...Download