add decoding test

NOTE: currently failing, likely an issuein base32 decode
This commit is contained in:
Sloane Perrault 2023-06-29 17:37:05 -04:00
parent cdd8624662
commit aa0251fdd1
No known key found for this signature in database

View file

@ -8,4 +8,12 @@ defmodule TypeIDTest do
end
end
describe "from_string!/1" do
test "parses TypeIDs as defined by the spec" do
tid = TypeID.from_string!("test_01h44had5rfswbvpc383ktj0aa")
assert "test" == TypeID.type(tid)
assert "01890915-34b8-7e78-bdd9-8340e7a9014a" == TypeID.uuid(tid)
end
end
end