Exemple #1
0
					"Setting env variable",
					"MY_VAR",
					"--has-a-cool-value",
				},
				[]string{"OK"},
				[]string{"TIP"},
			))
			Expect(*appRepo.UpdateParams.EnvironmentVars).To(Equal(map[string]interface{}{
				"MY_VAR": "--has-a-cool-value",
				"foo":    "bar",
			}))
		})

		Context("when setting fails", func() {
			BeforeEach(func() {
				appRepo.UpdateErr = true
			})

			It("tells the user", func() {
				runCommand("please", "dont", "fail")

				Expect(ui.Outputs).To(ContainSubstrings(
					[]string{"Setting env variable"},
					[]string{"FAILED"},
					[]string{"Error updating app."},
				))
			})
		})
	})
})