Skip to content

Commit

Permalink
ResponseFilter_can_patch_html_urls TEST - added case for URLs with fr…
Browse files Browse the repository at this point in the history
…agments (#372)
  • Loading branch information
turquoiseowl committed Jul 7, 2018
1 parent ce7bdc9 commit a745a2f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/i18n.Tests/Tests/ResponseFilterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public void ResponseFilter_can_patch_html_urls()
"fr",
"<a href=\"/\"></a>",
"<a href=\"/fr\"></a>");
Helper_ResponseFilter_can_patch_html_urls(
"fr",
"<a href=\"/shop\"></a>",
"<a href=\"/fr/shop\"></a>");

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

// Fragments.
Helper_ResponseFilter_can_patch_html_urls(
"fr",
"<a href=\"123#foo\"></a>",
"<a href=\"/fr/123#foo\"></a>");

// Single full script tag.
Helper_ResponseFilter_can_patch_html_urls(
"fr",
Expand Down

0 comments on commit a745a2f

Please sign in to comment.