(t *testing.T)
| 58 | } |
| 59 | |
| 60 | func TestParseUserPatternsBadJSON(t *testing.T) { |
| 61 | testData := strings.NewReader(`[ |
| 62 | {"name": "httpAuth", "pattern": "/[a-z0-9_/\\.:-]+@[a-z0-9-]+\\.[a-z0-9.-]+"}, |
| 63 | {"name": "base64", "pattern": "^(eyJ|YTo|Tzo|PD |
| 64 | ]`) |
| 65 | |
| 66 | _, err := ParseUserPatterns(testData) |
| 67 | |
| 68 | if err == nil { |
| 69 | t.Error("want non-nil error for ParseUserPatterns(testData) with bad JSON; but have nil", err) |
| 70 | } |
| 71 | } |
nothing calls this directly
no test coverage detected