package util_test import ( "testing" http "github.com/valyala/fasthttp" "source.toby3d.me/toby3d/auth/internal/util" ) const testBody = `

Sample Name

` func TestExtractProperty(t *testing.T) { t.Parallel() resp := http.AcquireResponse() defer http.ReleaseResponse(resp) resp.SetBodyString(testBody) results := util.ExtractProperty(resp, "h-card", "name") if results == nil || results[0] != "Sample Name" { t.Errorf(`ExtractProperty(resp, "h-card", "name") = %+s, want %+s`, results, []string{"Sample Name"}) } }