(t *testing.T)
| 175 | } |
| 176 | |
| 177 | func TestAccountAuthContractOmitsSensitiveFields(t *testing.T) { |
| 178 | example := jsonGoldenSuccessOutputExamples()["account"] |
| 179 | encoded, err := json.Marshal(example) |
| 180 | if err != nil { |
| 181 | t.Fatal(err) |
| 182 | } |
| 183 | |
| 184 | payload := string(encoded) |
| 185 | for _, forbidden := range []string{"access_token", "refresh_token", "app_key", "auth.json", ".config"} { |
| 186 | if strings.Contains(payload, forbidden) { |
| 187 | t.Fatalf("account JSON contains %q: %s", forbidden, payload) |
| 188 | } |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | func TestPublicJSONSchemaFiles(t *testing.T) { |
| 193 | tests := []struct { |
nothing calls this directly
no test coverage detected