Exemplo n.º 1
0
			appInstancesRepo.GetInstancesReturns(appInstanceFields, nil)
			stackRepo.FindByGUIDReturns(appStackModel, nil)
		})

		JustBeforeEach(func() {
			err = cmd.Execute(flagContext)
		})

		It("gets the application summary", func() {
			Expect(err).NotTo(HaveOccurred())
			Expect(appSummaryRepo.GetSummaryCallCount()).To(Equal(1))
		})

		It("gets the app instances", func() {
			Expect(err).NotTo(HaveOccurred())
			Expect(appInstancesRepo.GetInstancesCallCount()).To(Equal(1))
		})

		It("gets the application from the application requirement", func() {
			Expect(err).NotTo(HaveOccurred())
			Expect(applicationRequirement.GetApplicationCallCount()).To(Equal(1))
		})

		It("gets the stack name from the stack repository", func() {
			Expect(err).NotTo(HaveOccurred())
			Expect(stackRepo.FindByGUIDCallCount()).To(Equal(1))
		})

		It("prints a summary of the app", func() {
			Expect(err).NotTo(HaveOccurred())
			Expect(ui.Outputs()).To(ContainSubstrings(