コード例 #1
0
ファイル: app_test.go プロジェクト: fujitsu-cf/cli
				It("prints appropriate output", func() {
					Expect(err).NotTo(HaveOccurred())
					Expect(ui.Outputs()).To(ContainSubstrings(
						[]string{"Showing health and status", "fake-app-name", "my-org", "my-space", "my-user"},
						[]string{"state", "stopped"},
						[]string{"instances", "0/1"},
						[]string{"usage", "1G x 1 instances"},
						[]string{"There are no running instances of this app."},
					))
				})
			})
		})

		Context("when the package updated at is missing", func() {
			BeforeEach(func() {
				getAppSummaryModel.PackageUpdatedAt = nil
				appSummaryRepo.GetSummaryReturns(getAppSummaryModel, nil)
			})

			It("prints 'unknown' as last uploaded", func() {
				Expect(err).NotTo(HaveOccurred())

				Expect(ui.Outputs()).To(ContainSubstrings(
					[]string{"last uploaded: unknown"},
				))
			})
		})

		Context("when the application has no app ports", func() {
			BeforeEach(func() {
				getAppSummaryModel.AppPorts = []int{}