Пример #1
0
				var failures int
				for _, req := range actualRequirements {
					ok := req.Execute()
					if !ok {
						failures = failures + 1
					}
				}

				Expect(failures).To(Equal(1))
			})

			It("returns an OrgRequirement", func() {
				requirementsFactory.LoginSuccess = true
				requirementsFactory.UserRequirementFails = false
				requirementsFactory.OrganizationRequirementFails = true
				actualRequirements, err := cmd.Requirements(requirementsFactory, flagContext)
				Expect(err).NotTo(HaveOccurred())

				var failures int
				for _, req := range actualRequirements {
					ok := req.Execute()
					if !ok {
						failures = failures + 1
					}
				}

				Expect(failures).To(Equal(1))
			})
		})
	})