Skip to content

Commit a745a2f

Browse files
committed
ResponseFilter_can_patch_html_urls TEST - added case for URLs with fragments (#372)
1 parent ce7bdc9 commit a745a2f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: src/i18n.Tests/Tests/ResponseFilterTests.cs

+10
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ public void ResponseFilter_can_patch_html_urls()
5555
"fr",
5656
"<a href=\"/\"></a>",
5757
"<a href=\"/fr\"></a>");
58+
Helper_ResponseFilter_can_patch_html_urls(
59+
"fr",
60+
"<a href=\"/shop\"></a>",
61+
"<a href=\"/fr/shop\"></a>");
5862

5963
// Two attributes.
6064
Helper_ResponseFilter_can_patch_html_urls(
@@ -180,6 +184,12 @@ public void ResponseFilter_can_patch_html_urls()
180184
"<script src=\"123?a=b&c=d\"></script>",
181185
"<script src=\"/fr/123?a=b&c=d\"></script>");
182186

187+
// Fragments.
188+
Helper_ResponseFilter_can_patch_html_urls(
189+
"fr",
190+
"<a href=\"123#foo\"></a>",
191+
"<a href=\"/fr/123#foo\"></a>");
192+
183193
// Single full script tag.
184194
Helper_ResponseFilter_can_patch_html_urls(
185195
"fr",

0 commit comments

Comments
 (0)