Browse Source

Add html-alias test

index-subcmd
James Munns Vincent Prouillet 6 years ago
parent
commit
fbb57253a3
2 changed files with 5 additions and 1 deletions
  1. +4
    -0
      components/site/tests/site.rs
  2. +1
    -1
      test_site/content/posts/fixed-slug.md

+ 4
- 0
components/site/tests/site.rs View File

@@ -128,6 +128,10 @@ fn can_build_site_without_live_reload() {
assert!(file_exists!(public, "an-old-url/old-page/index.html"));
assert!(file_contains!(public, "an-old-url/old-page/index.html", "something-else"));

// html aliases work
assert!(file_exists!(public, "an-old-url/an-old-alias.html"));
assert!(file_contains!(public, "an-old-url/an-old-alias.html", "something-else"));

// redirect_to works
assert!(file_exists!(public, "posts/tutorials/devops/index.html"));
assert!(file_contains!(public, "posts/tutorials/devops/index.html", "docker"));


+ 1
- 1
test_site/content/posts/fixed-slug.md View File

@@ -3,7 +3,7 @@ title = "Fixed slug"
description = ""
slug = "something-else"
date = 2017-01-01
aliases = ["/an-old-url/old-page"]
aliases = ["/an-old-url/old-page", "/an-old-url/an-old-alias.html"]
+++

A simple page with a slug defined


Loading…
Cancel
Save