Expect(event.Type).To(Equal(db.CreateEvent)) Expect(event.Node.Value).To(ContainSubstring(`"ttl":50`)) By("when http route is upserted") err := etcd.SaveRoute(route) Expect(err).NotTo(HaveOccurred()) Consistently(results).ShouldNot(Receive()) }) }) }) Describe("DeleteTcpRouteMapping", func() { var err error JustBeforeEach(func() { err = fakeEtcd.DeleteTcpRouteMapping(tcpMapping) }) Context("when a tcp mapping exists", func() { BeforeEach(func() { fakeKeysAPI.DeleteReturns(nil, nil) }) It("Deletes the mapping", func() { Expect(err).NotTo(HaveOccurred()) Expect(fakeKeysAPI.DeleteCallCount()).To(Equal(1)) }) }) Context("when tcp mapping does not exist", func() { BeforeEach(func() {