}) It("fails and tells the user", func() { runCommand("my-nonexistent-security-group", "my-org", "my-space") Expect(fakeSecurityGroupRepo.ReadArgsForCall(0)).To(Equal("my-nonexistent-security-group")) Expect(ui.Outputs).To(ContainSubstrings( []string{"FAILED"}, []string{"security group", "my-nonexistent-security-group", "not found"}, )) }) }) Context("when the org does not exist", func() { BeforeEach(func() { fakeOrgRepo.FindByNameNotFound = true }) It("fails and tells the user", func() { runCommand("sec group", "org", "space") Expect(fakeOrgRepo.FindByNameName).To(Equal("org")) Expect(ui.Outputs).To(ContainSubstrings( []string{"FAILED"}, []string{"Org", "org", "not found"}, )) }) }) Context("when the space does not exist", func() { BeforeEach(func() {