diff --git a/test/lib/blog/parser_test.exs b/test/lib/blog/parser_test.exs index c886f4e..1d22aa5 100644 --- a/test/lib/blog/parser_test.exs +++ b/test/lib/blog/parser_test.exs @@ -16,12 +16,25 @@ defmodule JOL.Blog.ParserTest do Body! """ - {:ok, content: content} + {attrs, body} = Parser.parse("/filename/doesnt/matter", content) + + {:ok, content: content, attrs: attrs, body: body} end test "parses the body from zola-style posts", post do - {_attrs, body} = Parser.parse("/fake/filename", post.content) - assert body == "Body!" + assert post.body == "Body!" + end + + test "parses the title from zola-style posts", post do + assert post.attrs.title == "test post" + end + + test "parses the tags from zola-style posts", post do + assert post.attrs.tags == ["howto", "hardware"] + end + + test "parses the draft status from zola-style posts", post do + assert post.attrs.draft == false end test "parses the attrs from zola-style posts", post do