Beispiel #1
0
					if id == childID {
						return true, nil
					}
					if id == parentID {
						return false, nil
					}

					return false, errors.New("Unsupported ID")
				}
			})

			It("should delegate to the cake", func() {
				isLeaf, err := aufsCake.IsLeaf(childID)
				Expect(isLeaf).To(BeTrue())
				Expect(err).NotTo(HaveOccurred())
				Expect(cake.IsLeafCallCount()).To(Equal(1))
				Expect(cake.IsLeafArgsForCall(0)).To(Equal(childID))
			})

			It("should also delegate to the cake for the parent", func() {
				isLeaf, err := aufsCake.IsLeaf(parentID)
				Expect(isLeaf).To(BeFalse())
				Expect(err).NotTo(HaveOccurred())
				Expect(cake.IsLeafCallCount()).To(Equal(1))
				Expect(cake.IsLeafArgsForCall(0)).To(Equal(parentID))
			})
		})
	})

	Describe("GetAllLeaves", func() {
		Context("when there are no cloned layers", func() {