Ejemplo n.º 1
0
			verified  bool
			verifyErr error
		)

		BeforeEach(func() {
			httpClient = &http.Client{}
		})

		JustBeforeEach(func() {
			verified, verifyErr = verifier.Verify(lagertest.NewTestLogger("test"), httpClient)
		})

		Context("when the client yields organizations", func() {
			Context("including one of the desired organizations", func() {
				BeforeEach(func() {
					fakeClient.OrganizationsReturns([]string{organizations[0], "bogus-organization"}, nil)
				})

				It("succeeds", func() {
					Expect(verifyErr).ToNot(HaveOccurred())
				})

				It("returns true", func() {
					Expect(verified).To(BeTrue())
				})
			})

			Context("not including the desired organizations", func() {
				BeforeEach(func() {
					fakeClient.OrganizationsReturns([]string{"bogus-organization"}, nil)
				})