Example #1
0
			appSummaryRepo.GetSummaryReturns(getAppSummaryModel, getAppSummaryErr)
			appInstancesRepo.GetInstancesReturns(appInstanceFields, 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("prints a summary of the app", func() {
			Expect(err).NotTo(HaveOccurred())
			Expect(ui.Outputs()).To(ContainSubstrings(
				[]string{"Showing health and status for app fake-app-name"},
				[]string{"requested state: started"},
				[]string{"instances: 1/1"},
				// Commented to hide app-ports for release #117189491
				// []string{"app ports: 8080, 9090"},