Skip to content

Commit

Permalink
Different separator
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarvelle committed Nov 5, 2024
1 parent 5c973d1 commit a555182
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/no/ndla/taxonomy/util/PrettyUrlUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static Optional<String> createPrettyUrl(
rootName.ifPresent(rn -> {
if (!rn.equals(name)) {
buildUrlFragment(builder, cleanString(rootName.get()));
builder.append("_");
builder.append("/");
}
});
buildUrlFragment(builder, cleanString(name));
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/no/ndla/taxonomy/util/PrettyUrlUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void test_create_pretty_url() {
@Test
void test_create_pretty_url_with_root() {
assertEquals(
"/e/the-root-title_this-is-a-title/hash",
"/e/the-root-title/this-is-a-title/hash",
PrettyUrlUtil.createPrettyUrl(Optional.of("The root title"), "This is a title", "hash", NodeType.TOPIC)
.get());
}
Expand Down Expand Up @@ -60,7 +60,7 @@ void test_create_pretty_url_with_norwegian_chars() {
Optional.empty(), "Når kommer høsten tror du ærlig talt?", "hash", NodeType.TOPIC)
.get());
assertEquals(
"/e/utgatt-historie_a-hoppe-etter-wirkola/hash",
"/e/utgatt-historie/a-hoppe-etter-wirkola/hash",
PrettyUrlUtil.createPrettyUrl(
Optional.of("Utgått historie"), "Å hoppe etter wirkola", "hash", NodeType.TOPIC)
.get());
Expand Down

0 comments on commit a555182

Please sign in to comment.