[Groonga-commit] groonga/fluent-plugin-droonga at cdc46f9 [master] test add: add a test that adds a record with values

Back to archive index

Kosuke Asami null+****@clear*****
Thu Jul 18 10:06:42 JST 2013


Kosuke Asami	2013-07-18 10:06:42 +0900 (Thu, 18 Jul 2013)

  New Revision: cdc46f97e1912aaaf12b9fa45051d93b21a2c4d7
  https://github.com/groonga/fluent-plugin-droonga/commit/cdc46f97e1912aaaf12b9fa45051d93b21a2c4d7

  Message:
    test add: add a test that adds a record with values

  Modified files:
    test/plugin/test_handler_add.rb

  Modified: test/plugin/test_handler_add.rb (+12 -0)
===================================================================
--- test/plugin/test_handler_add.rb    2013-07-17 15:14:09 +0900 (cb73a32)
+++ test/plugin/test_handler_add.rb    2013-07-18 10:06:42 +0900 (031fef9)
@@ -39,6 +39,7 @@ class AddHandlerTest < Test::Unit::TestCase
       schema.create_table("Users",
                           :type => :hash,
                           :key_type => :short_text) do |table|
+        table.short_text("country")
       end
     end
   end
@@ -69,4 +70,15 @@ class AddHandlerTest < Test::Unit::TestCase
     table =****@worke*****["Users"]
     assert_equal(["mori"], table.collect(&:key))
   end
+
+  def test_add_with_values
+    request = {
+      "table"  => "Users",
+      "key"    => "asami",
+      "values" => { "country" => "japan" },
+    }
+    @handler.add(request)
+    table =****@worke*****["Users"]
+    assert_equal(["japan"], table.collect(&:country))
+  end
 end
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index