Minor cleanup
This commit is contained in:
parent
9b084b0dea
commit
b97abc7091
3 changed files with 10 additions and 10 deletions
|
@ -93,13 +93,4 @@ class TestEncode {
|
||||||
t.setAttribute(TestCase.FOO, "a test &");
|
t.setAttribute(TestCase.FOO, "a test &");
|
||||||
assertThat(t.getContent()).isEqualTo("<test>\n <foo>a test &</foo>\n</test>");
|
assertThat(t.getContent()).isEqualTo("<test>\n <foo>a test &</foo>\n</test>");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void testNormalize() {
|
|
||||||
var t = TemplateFactory.HTML.get("normalize");
|
|
||||||
var foo = "News for January 6, 2023 (Paris)";
|
|
||||||
t.setValue(TestCase.FOO, foo);
|
|
||||||
assertThat(t.getContent()).isEqualTo("<a href=\"https://example.com/news/news-for-january-6-2023-paris\">"
|
|
||||||
+ foo + "</a>");
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -36,6 +36,15 @@ class TestFormat {
|
||||||
assertThat(t.getContent()).isEmpty();
|
assertThat(t.getContent()).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testNormalize() {
|
||||||
|
var t = TemplateFactory.HTML.get("normalize");
|
||||||
|
var foo = "News for January 6, 2023 (Paris)";
|
||||||
|
t.setValue(TestCase.FOO, foo);
|
||||||
|
assertThat(t.getContent()).isEqualTo("<a href=\"news/20230106/news-for-january-6-2023-paris\">"
|
||||||
|
+ foo + "</a>");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testShortenUrl() {
|
void testShortenUrl() {
|
||||||
var t = TemplateFactory.HTML.get("shortenUrl");
|
var t = TemplateFactory.HTML.get("shortenUrl");
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<a href="https://example.com/news/{{v render:rife.render.Normalize:foo/}}"><!--v foo/--></a>
|
<a href="news/20230106/{{v render:rife.render.Normalize:foo/}}"><!--v foo/--></a>
|
Loading…
Add table
Add a link
Reference in a new issue