MCPcopy Create free account
hub / github.com/algolia/cli / TestRun_FreeNonInteractive

Function TestRun_FreeNonInteractive

pkg/cmd/application/create/create_test.go:268–279  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

266}
267
268func TestRun_FreeNonInteractive(t *testing.T) {
269 srv := newServer(t, `{"has_payment_method": false}`)
270 defer srv.Close()
271
272 opts, out, _ := newOpts(t, srv, false)
273 opts.AcceptTerms = true
274
275 require.NoError(t, runCreateCmd(context.Background(), opts))
276 assert.Equal(t, 1, srv.createCalls)
277 assert.Equal(t, 0, srv.patchCalls)
278 assert.Contains(t, out.String(), "APP1")
279}
280
281func TestRun_NonInteractiveRequiresAcceptTerms(t *testing.T) {
282 srv := newServer(t, `{"has_payment_method": true}`)

Callers

nothing calls this directly

Calls 5

newServerFunction · 0.70
newOptsFunction · 0.70
runCreateCmdFunction · 0.70
CloseMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected