JOL/test/lib/blog/parser_test.exs

23 lines
418 B
Elixir
Raw Normal View History

defmodule Jol.Blog.ParserTest do
use ExUnit.Case, async: true
alias Jol.Blog.Parser
test "parses attrs from zola-style posts" do
content = """
+++
title = "test post"
draft = false
date = 2024-01-02 14:00:00-05:00
[taxonomies]
tags = ["howto", "hardware"]
+++
Body!
"""
{_attrs, body} = Parser.parse("/fake/filename", content)
assert body == "Body!"
end
end