"delete", "app-name",
				"-f",
			}))
		})

		It("returns errors from the delete", func() {
			cliConn.CliCommandReturns([]string{}, errors.New("bad app"))

			err := repo.DeleteApplication("app-name")
			Ω(err).Should(MatchError("bad app"))
		})
	})

	Describe("ListApplications", func() {
		Context("when we called", func() {
			It("then it should call the get apps list api", func() {
				err := repo.ListApplications()
				Ω(err).ShouldNot(HaveOccurred())
				Ω(cliConn.GetAppsCallCount()).Should(Equal(1))
			})
		})
		Context("when the get apps call yields an error", func() {
			It("then it should return the errors ", func() {
				cliConn.GetAppsReturns(nil, errors.New("bad apps"))
				err := repo.ListApplications()
				Ω(err).Should(MatchError("bad apps"))
			})
		})
	})
})