plug_indie/test/parser_test.exs
Inhji c257845f06 first version of PlugIndie
- add attribute parsing
- add tests
- add token verification
2024-11-29 10:39:35 +01:00

17 lines
435 B
Elixir

defmodule ParserTest do
use ExUnit.Case
doctest PlugMicropub.Parser
import PlugMicropub.Parser, only: [parse_create_body: 2]
test "parse_create_body with content-type json" do
params = %{
"type" => ["h-entry"],
"properties" => %{
"content" => "Hello World!"
}
}
assert {:ok, "entry", %{"content" => "Hello World!"}} =
parse_create_body("application/json", params)
end
end