コード例 #1
0
				It("logs the step", func() {
					err := step.Perform()
					Expect(err).To(HaveOccurred())
					Expect(logger.TestSink.LogMessages()).To(ConsistOf([]string{
						"test.upload-step.upload-starting",
						"test.upload-step.failed-to-upload",
					}))

				})
			})
		})

		Context("when there is an error parsing the upload url", func() {
			BeforeEach(func() {
				uploadAction.To = "foo/bar"
			})

			It("returns the appropriate error", func() {
				err := step.Perform()
				Expect(err).To(BeAssignableToTypeOf(&url.Error{}))
			})

			It("logs the step", func() {
				err := step.Perform()
				Expect(err).To(HaveOccurred())
				Expect(logger.TestSink.LogMessages()).To(ConsistOf([]string{
					"test.upload-step.upload-starting",
					"test.upload-step.failed-to-parse-url",
				}))