test/test_helper.rb in embulk-output-bigquery-0.3.7 vs test/test_helper.rb in embulk-output-bigquery-0.4.0
- old
+ new
@@ -12,9 +12,19 @@
def shutdown
FileUtils.rm_rf('tmp')
end
end
+ def has_partition_decorator?
+ assert_true Helper.has_partition_decorator?('table$20160929')
+ assert_false Helper.has_partition_decorator?('table')
+ end
+
+ def chomp_partition_decorator
+ assert_equal 'table', Helper.chomp_partition_decorator?('table$20160929')
+ assert_equal 'table', Helper.chomp_partition_decorator?('table')
+ end
+
def bq_type_from_embulk_type
assert_equal 'BOOLEAN', Helper.bq_type_from_embulk_type(:boolean)
assert_equal 'STRING', Helper.bq_type_from_embulk_type(:string)
assert_equal 'FLOAT', Helper.bq_type_from_embulk_type(:double)
assert_equal 'STRING', Helper.bq_type_from_embulk_type(:string)