test/test_publication.rb in epub-parser-0.3.3 vs test/test_publication.rb in epub-parser-0.3.4
- old
+ new
@@ -16,9 +16,26 @@
@package.metadata = another_metadata
assert_nil metadata.package
end
+ def test_full_path_equals_to_corresponding_rootfiles_one
+ full_path = Addressable::URI.parse("OPS/content.opf")
+ ocf = EPUB::OCF.new
+ ocf.container = EPUB::OCF::Container.new
+ rootfile = EPUB::OCF::Container::Rootfile.new(full_path)
+ rootfile.package = @package
+ another_rootfile = Object.new
+ stub(another_rootfile).package
+ ocf.container.rootfiles << another_rootfile
+ ocf.container.rootfiles << rootfile
+ book = Object.new
+ stub(book).ocf {ocf}
+ @package.book = book
+
+ assert_equal full_path, @package.full_path
+ end
+
class TestMetadata < TestPublication
def setup
@metadata = Package::Metadata.new
end