Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

test why text/hyphen fails

as-opc6f84c9a2ad8
diff --git a/spec/models/work_package/pdf_export/document_generator_spec.rb b/spec/models/work_package/pdf_export/document_generator_spec.rb
index b2ef7ceb69f..f7280f0ec22 100644
--- a/spec/models/work_package/pdf_export/document_generator_spec.rb
+++ b/spec/models/work_package/pdf_export/document_generator_spec.rb
@@ -1,4 +1,5 @@
require "spec_helper"
+require "text/hyphen"
RSpec.describe WorkPackage::PDFExport::DocumentGenerator do
include Redmine::I18n
@@ -73,6 +74,12 @@ RSpec.describe WorkPackage::PDFExport::DocumentGenerator do
}
end
+ it "loads the hyphenation language" do
+ hyphens = Text::Hyphen.new(language: options[:hyphenation], left: 2, right: 2)
+ split = hyphens.visualise("honorificabilitudinitatibus", Prawn::Text::SHY)
+ expect(split).to eq("hon­ori­fi­ca­bil­i­tu­dini­tat­i­bus")
+ end
+
it "contains correct data" do
expected_result = [
"This is a test description with an macro:",