[Groonga-commit] droonga/fluent-plugin-droonga at 7c180c9 [master] test: group column valueType tests

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Apr 11 16:34:53 JST 2014


Kouhei Sutou	2014-04-11 16:34:53 +0900 (Fri, 11 Apr 2014)

  New Revision: 7c180c96cfabab5e8b0878c679348b40abc4e7f3
  https://github.com/droonga/fluent-plugin-droonga/commit/7c180c96cfabab5e8b0878c679348b40abc4e7f3

  Message:
    test: group column valueType tests

  Modified files:
    test/unit/catalog/test_schema.rb

  Modified: test/unit/catalog/test_schema.rb (+16 -6)
===================================================================
--- test/unit/catalog/test_schema.rb    2014-04-11 16:32:14 +0900 (2ff9361)
+++ test/unit/catalog/test_schema.rb    2014-04-11 16:34:53 +0900 (f61aaf7)
@@ -198,12 +198,22 @@ class CatalogSchemaTest < Test::Unit::TestCase
         end
       end
 
-      def test_value_type
-        assert_equal("ShortText",
-                     create_column("column_name",
-                                   {
-                                     "valueType" => "ShortText"
-                                   }).value_type)
+      class ValueType < self
+        def value_type(data)
+          create_column("column_name", data).value_type
+        end
+
+        def test_data_type
+          assert_equal("ShortText", value_type("valueType" => "ShortText"))
+        end
+
+        def test_reference_type
+          assert_equal("Users", value_type("valueType" => "Users"))
+        end
+
+        def test_default
+          assert_nil(value_type({}))
+        end
       end
 
       def test_value_type_groonga
-------------- next part --------------
HTML����������������������������...
Download 



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