コード例 #1
0
				})

				Context("when deleting the start messages fails", func() {
					BeforeEach(func() {
						storeAdapter.DeleteErrInjector = fakestoreadapter.NewFakeStoreAdapterErrorInjector("start", errors.New("oops"))
					})

					It("should return an error", func() {
						Ω(err).Should(HaveOccurred())
					})
				})
			})

			Context("when the message fails to send", func() {
				BeforeEach(func() {
					messageBus.PublishError = errors.New("oops")
				})

				It("should return an error", func() {
					Ω(err).Should(HaveOccurred())
				})

				It("should not increment the metrics", func() {
					Ω(metricsAccountant.IncrementedStarts).Should(BeEmpty())
				})
			})
		})

		Context("When the message has already been sent", func() {
			BeforeEach(func() {
				sentOn = 130