Navigation Menu

Skip to content

Commit

Permalink
test: group column valueType tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 11, 2014
1 parent a4462a5 commit 7c180c9
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions test/unit/catalog/test_schema.rb
Expand Up @@ -198,12 +198,22 @@ def test_default
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
Expand Down

0 comments on commit 7c180c9

Please sign in to comment.