From aa0251fdd1f6b4064f11a1b2cbba22e282502ada Mon Sep 17 00:00:00 2001 From: Sloane Perrault Date: Thu, 29 Jun 2023 17:37:05 -0400 Subject: [PATCH] add decoding test NOTE: currently failing, likely an issuein base32 decode --- test/type_id_test.exs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/type_id_test.exs b/test/type_id_test.exs index 8101f10..4b6a67d 100644 --- a/test/type_id_test.exs +++ b/test/type_id_test.exs @@ -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