MCPcopy Create free account
hub / github.com/dropbox/dbxcli / decodeAccountOutput

Function decodeAccountOutput

cmd/account_test.go:218–235  ·  view source on GitHub ↗
(t *testing.T, out *bytes.Buffer)

Source from the content-addressed store, hash-verified

216}
217
218func 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
237func assertAccountAuth(t *testing.T, got *accountAuth, source string, refreshable bool, authFile string) {
238 t.Helper()

Calls

no outgoing calls

Tested by

no test coverage detected