Ejemplo n.º 1
0
func TestSelectNewAppNoCode(t *testing.T) {
	t.Parallel()
	h, _ := parsecli.NewAppHarness(t)
	defer h.Stop()

	h.Env.In = ioutil.NopCloser(strings.NewReader("email\npassword\n"))
	n := &newCmd{noCode: true, parseAppName: "A"}
	ensure.Nil(t, n.run(h.Env))
	ensure.StringContains(t, h.Out.String(), "Successfully selected")
}
Ejemplo n.º 2
0
func TestRunListCmd(t *testing.T) {
	t.Parallel()

	h, _ := parsecli.NewAppHarness(t)
	defer h.Stop()

	l := &listCmd{}
	h.Env.In = ioutil.NopCloser(strings.NewReader("email\npassword\n"))
	ensure.Nil(t, l.run(h.Env, []string{"A"}))
	ensure.StringContains(t, h.Out.String(), `Properties of the app "A"`)
}