예제 #1
0
						Guid:  "service-guid-v2",
					},
				}

				service1 := models.ServiceOffering{
					ServiceOfferingFields: models.ServiceOfferingFields{
						Label:    "service",
						Guid:     "service-guid",
						Provider: "a provider",
					},
				}

				serviceRepo.FindServiceOfferingsForSpaceByLabelReturns = struct {
					ServiceOfferings models.ServiceOfferings
					Error            error
				}{
					models.ServiceOfferings([]models.ServiceOffering{
						service1, service2}),
					nil,
				}
			})

			It("returns the nv2 service", func() {
				service, err := serviceBuilder.GetServiceByNameForSpace("service", "spaceGuid")
				Expect(err).NotTo(HaveOccurred())

				Expect(len(service.Plans)).To(Equal(0))
				Expect(service.Guid).To(Equal("service-guid-v2"))
			})
		})

		Context("v2 services", func() {