Add html-alias test
This commit is contained in:
parent
cf1f8317bb
commit
fbb57253a3
|
@ -128,6 +128,10 @@ fn can_build_site_without_live_reload() {
|
||||||
assert!(file_exists!(public, "an-old-url/old-page/index.html"));
|
assert!(file_exists!(public, "an-old-url/old-page/index.html"));
|
||||||
assert!(file_contains!(public, "an-old-url/old-page/index.html", "something-else"));
|
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
|
// redirect_to works
|
||||||
assert!(file_exists!(public, "posts/tutorials/devops/index.html"));
|
assert!(file_exists!(public, "posts/tutorials/devops/index.html"));
|
||||||
assert!(file_contains!(public, "posts/tutorials/devops/index.html", "docker"));
|
assert!(file_contains!(public, "posts/tutorials/devops/index.html", "docker"));
|
||||||
|
|
|
@ -3,7 +3,7 @@ title = "Fixed slug"
|
||||||
description = ""
|
description = ""
|
||||||
slug = "something-else"
|
slug = "something-else"
|
||||||
date = 2017-01-01
|
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
|
A simple page with a slug defined
|
||||||
|
|
Loading…
Reference in a new issue