Browse Source

Add a test for shortcodes with arg

index-subcmd
Vincent Prouillet 6 years ago
parent
commit
bddf2b53fd
3 changed files with 4 additions and 0 deletions
  1. +2
    -0
      components/site/test_site/content/posts/python.md
  2. +1
    -0
      components/site/test_site/templates/shortcodes/pirate.html
  3. +1
    -0
      components/site/tests/site.rs

+ 2
- 0
components/site/test_site/content/posts/python.md View File

@@ -8,4 +8,6 @@ Same filename but different path

{{ basic() }}

{{ pirate(name="Bob") }}



+ 1
- 0
components/site/test_site/templates/shortcodes/pirate.html View File

@@ -0,0 +1 @@
Arrrh {{ name }}

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

@@ -109,6 +109,7 @@ fn can_build_site_without_live_reload() {
assert!(file_exists!(public, "posts/python/index.html"));
// Shortcodes work
assert!(file_contains!(public, "posts/python/index.html", "Basic shortcode"));
assert!(file_contains!(public, "posts/python/index.html", "Arrrh Bob"));
assert!(file_exists!(public, "posts/tutorials/devops/nix/index.html"));
assert!(file_exists!(public, "posts/with-assets/index.html"));
assert!(file_exists!(public, "posts/no-section/simple/index.html"));


Loading…
Cancel
Save