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

Function TestRun_InvalidPlanErrors

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

Source from the content-addressed store, hash-verified

436}
437
438func TestRun_InvalidPlanErrors(t *testing.T) {
439 srv := newServer(t, `{"has_payment_method": true}`)
440 defer srv.Close()
441
442 opts, _, _ := newOpts(t, srv, false)
443 opts.Plan = "bogus"
444 opts.AcceptTerms = true
445
446 err := runCreateCmd(context.Background(), opts)
447 require.Error(t, err)
448 assert.Contains(t, err.Error(), "invalid plan")
449 assert.Equal(t, 0, srv.createCalls)
450}
451
452func TestRun_InteractivePickerHidesPaidWithoutBilling(t *testing.T) {
453 srv := newServer(t, `{"has_payment_method": false}`)

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected