(t *testing.T, out *bytes.Buffer)
| 216 | } |
| 217 | |
| 218 | func decodeAccountOutput(t *testing.T, out *bytes.Buffer) accountJSONOutput { |
| 219 | t.Helper() |
| 220 | |
| 221 | var got accountJSONOutput |
| 222 | if err := json.Unmarshal(out.Bytes(), &got); err != nil { |
| 223 | t.Fatalf("decode JSON output: %v\noutput: %s", err, out.String()) |
| 224 | } |
| 225 | if got.Warnings == nil { |
| 226 | t.Fatalf("warnings = nil, want empty array") |
| 227 | } |
| 228 | if len(got.Warnings) != 0 { |
| 229 | t.Fatalf("warnings = %+v, want empty", got.Warnings) |
| 230 | } |
| 231 | if len(got.Results) != 1 { |
| 232 | t.Fatalf("results len = %d, want 1", len(got.Results)) |
| 233 | } |
| 234 | return got |
| 235 | } |
| 236 | |
| 237 | func assertAccountAuth(t *testing.T, got *accountAuth, source string, refreshable bool, authFile string) { |
| 238 | t.Helper() |
no outgoing calls
no test coverage detected