Skip to content
Snippets Groups Projects
Commit a36602d8 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-7131 remove default value from template

parent 707bffe6
No related branches found
No related tags found
No related merge requests found
Guten Tag, Guten Tag,
Sie haben eine Zuarbeitsanfrage erhalten. Bitte klicken Sie auf folgenden Link, um zum Vorgang zu gelangen: Sie haben eine Zuarbeitsanfrage erhalten. Bitte klicken Sie auf folgenden Link, um zum Vorgang zu gelangen:
${linkToVorgang!""} ${linkToVorgang}
Mit freundlichen Grüßen Mit freundlichen Grüßen
Ihre Verwaltung Ihre Verwaltung
\ No newline at end of file
...@@ -25,14 +25,17 @@ package de.ozgcloud.collaboration.common.freemarker; ...@@ -25,14 +25,17 @@ package de.ozgcloud.collaboration.common.freemarker;
import static org.assertj.core.api.Assertions.*; import static org.assertj.core.api.Assertions.*;
import java.util.Collections;
import java.util.Map; import java.util.Map;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import de.ozgcloud.collaboration.CollaborationService; import de.ozgcloud.collaboration.CollaborationService;
import de.ozgcloud.common.errorhandling.TechnicalException;
import de.ozgcloud.common.test.ITCase; import de.ozgcloud.common.test.ITCase;
@ITCase @ITCase
...@@ -46,14 +49,11 @@ class TemplateHandlerITCase { ...@@ -46,14 +49,11 @@ class TemplateHandlerITCase {
class TestGetRawTemplate { class TestGetRawTemplate {
@Test @Test
void shouldReturnTemplateAsString() { void shouldThrowException() {
var content = handler.fillTemplate(CollaborationService.COLLABORATION_NACHRICHT_TEMPLATE, Map.of()); var templateArguments = Collections.emptyMap();
assertThat(content) Assertions.assertThrows(TechnicalException.class,
.contains("Guten Tag,") () -> handler.fillTemplate(CollaborationService.COLLABORATION_NACHRICHT_TEMPLATE, templateArguments));
.contains("Sie haben eine Zuarbeitsanfrage erhalten. Bitte klicken Sie auf folgenden Link, um zum Vorgang zu gelangen:")
.contains("Mit freundlichen Grüßen")
.contains("Ihre Verwaltung");
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment