Integration: ResolveInput flows through ParseJSONMap correctly.
(t *testing.T)
| 206 | |
| 207 | // Integration: ResolveInput flows through ParseJSONMap correctly. |
| 208 | func TestParseJSONMap_WithStdin(t *testing.T) { |
| 209 | stdin := strings.NewReader(`{"message_id":"om_xxx","user_id_type":"open_id"}`) |
| 210 | got, err := ParseJSONMap("-", "--params", stdin, nil) |
| 211 | if err != nil { |
| 212 | t.Fatalf("unexpected error: %v", err) |
| 213 | } |
| 214 | if len(got) != 2 { |
| 215 | t.Errorf("got %d keys, want 2", len(got)) |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | // Integration: @file flows through ParseJSONMap correctly. |
| 220 | func TestParseJSONMap_WithAtFile(t *testing.T) { |
nothing calls this directly
no test coverage detected