diff --git a/types_test.go b/types_test.go index 1ca3616..d07803e 100644 --- a/types_test.go +++ b/types_test.go @@ -363,3 +363,13 @@ func TestUIDRecommendedFormat(t *testing.T) { t.Fatalf("UID should have failed validation because its hyphens have been replaced\n") } } + +func TestRandomUID(t *testing.T) { + uid, err := ofxgo.RandomUID() + if err != nil { + t.Fatalf("Unexpected error when calling RandomUID: %s\n", err) + } + if ok, err := uid.RecommendedFormat(); !ok || err != nil { + t.Fatalf("UID generated with RandomUID() doesn't match recommended format: %s\n", err) + } +}