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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
use single quotes to avoid escaping double quotes
as-op81efe18f3300
diff --git a/spec/models/work_package/pdf_export/common/macro_spec.rb b/spec/models/work_package/pdf_export/common/macro_spec.rbindex 6f0adae19a1..b70e0c67f6c 100644--- a/spec/models/work_package/pdf_export/common/macro_spec.rb+++ b/spec/models/work_package/pdf_export/common/macro_spec.rb@@ -91,7 +91,7 @@ RSpec.describe WorkPackage::PDFExport::Common::Macro doenddescribe "wp mention macro" do- let(:expected_tag) {+ let(:expected_tag) do"<mention class=\"mention\" data-id=\"#{work_package.id}\" data-type=\"work_package\" data-text=\"##{@@ -99,18 +99,20 @@ RSpec.describe WorkPackage::PDFExport::Common::Macro do}\">##{work_package.id}</mention>"- }+ end+describe "with tag" dolet(:markdown) { expected_tag }it "loops the tag through" do+ # note: escaped backslash in the tag text for correct markdown renderingexpect(formatted).to eq("<mention class=\"mention\" data-id=\"#{work_package.id}\" data-type=\"work_package\" data-text=\"##{work_package.id- }\">\\##{work_package.id}</mention>" # note: escaped backslash in the tag text for correct markdown rendering- )+ }\">\\##{work_package.id}</mention>"+ )endend@@ -217,7 +219,7 @@ RSpec.describe WorkPackage::PDFExport::Common::Macro doenddescribe "with custom field by name" do- let(:markdown) { "workPackageValue:\"Custom Field 1\"" }+ let(:markdown) { 'workPackageValue:"Custom Field 1"' }it "outputs the custom field value" doexpect(formatted).to eq("Custom value 1")@@ -301,7 +303,7 @@ RSpec.describe WorkPackage::PDFExport::Common::Macro doenddescribe "with custom field by name" do- let(:markdown) { "workPackageLabel:\"Custom Field 1\"" }+ let(:markdown) { 'workPackageLabel:"Custom Field 1"' }it "outputs the custom field name" doexpect(formatted).to eq("Custom field 1")@@ -383,7 +385,7 @@ RSpec.describe WorkPackage::PDFExport::Common::Macro doenddescribe "with custom field by name" do- let(:markdown) { "projectValue:\"Project Custom Field 1\"" }+ let(:markdown) { 'projectValue:"Project Custom Field 1"' }it "outputs the custom field value" doexpect(formatted).to eq("Project custom value 1")@@ -475,7 +477,7 @@ RSpec.describe WorkPackage::PDFExport::Common::Macro doenddescribe "with custom field by name" do- let(:markdown) { "projectLabel:\"Project Custom Field 1\"" }+ let(:markdown) { 'projectLabel:"Project Custom Field 1"' }it "outputs the custom field name" doexpect(formatted).to eq("Project custom field 1")