test/test-pdf.rb in chupa-text-decomposer-pdf-1.0.2 vs test/test-pdf.rb in chupa-text-decomposer-pdf-1.0.3
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright (C) 2013-2014 Kouhei Sutou <kou@clear-code.com>
+# Copyright (C) 2013-2017 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
@@ -35,19 +35,24 @@
sub_test_case("extension") do
def create_data(uri)
data = ChupaText::Data.new
data.body = ""
data.uri = uri
+ data.mime_type = "application/octet-stream"
data
end
def test_pdf
- assert_true(decomposer.target?(create_data("index.pdf")))
+ assert do
+ decomposer.target?(create_data("index.pdf"))
+ end
end
def test_html
- assert_false(decomposer.target?(create_data("index.html")))
+ assert do
+ not decomposer.target?(create_data("index.html"))
+ end
end
end
sub_test_case("mime-type") do
def create_data(mime_type)
@@ -103,10 +108,10 @@
def test_producer
assert_equal(["LibreOffice 4.1"], decompose("producer"))
end
def test_created_time
- assert_equal([Time.parse("2014-01-06T00:52:45+09:00")],
+ assert_equal([Time.parse("2014-01-05T06:52:45Z")],
decompose("created_time"))
end
private
def decompose(attribute_name)