From 66977aa7bba7a1814f7b722553c75ea020c94226 Mon Sep 17 00:00:00 2001 From: Ryuhei Yoshida Date: Tue, 22 Aug 2023 17:59:57 +0900 Subject: [PATCH] doc: Add a sample post to show the usage of tags (#133) --- blog_test.ts | 24 ++++++++++++++++++++++++ testdata/posts/sixth.md | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 testdata/posts/sixth.md diff --git a/blog_test.ts b/blog_test.ts index d32ee96..7de3699 100644 --- a/blog_test.ts +++ b/blog_test.ts @@ -185,6 +185,30 @@ Deno.test("posts/ 中文", async () => { assertStringIncludes(body, `

你好,世界!`); }); +Deno.test("posts/ sixth", async () => { + const resp = await testHandler(new Request("https://blog.deno.dev/sixth")); + assert(resp); + assertEquals(resp.status, 200); + assertEquals(resp.headers.get("content-type"), "text/html; charset=utf-8"); + const body = await resp.text(); + assertStringIncludes( + body, + `#sample`, + ); + assertStringIncludes( + body, + `#tags`, + ); + assertStringIncludes(body, ``); + assertStringIncludes( + body, + ``, + ); + assertStringIncludes(body, `Sixth post`); + assertStringIncludes(body, `