Example #1
0
					ServiceOfferingFields: models.ServiceOfferingFields{
						Label: "service",
						Guid:  "service-guid-v2",
					},
				}

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

				serviceRepo.FindServiceOfferingsForSpaceByLabelReturns(
					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() {
			BeforeEach(func() {
				service := models.ServiceOffering{