Describe("and the login succeeds", func() { BeforeEach(func() { orgRepo.FindByNameReturns(models.Organization{ OrganizationFields: models.OrganizationFields{ Name: "new-org", Guid: "new-org-guid", }, }, nil) space1 := models.Space{} space1.Guid = "new-space-guid" space1.Name = "new-space-name" spaceRepo.ListSpacesStub = listSpacesStub([]models.Space{space1}) spaceRepo.FindByNameReturns(space1, nil) authRepo.AccessToken = "new_access_token" authRepo.RefreshToken = "new_refresh_token" Flags = []string{"-u", "*****@*****.**", "-p", "password", "-o", "new-org", "-s", "new-space"} Config.SetApiEndpoint("api.the-old-endpoint.com") Config.SetSSLDisabled(true) }) ItSucceeds() ItShowsTheTarget() It("does not update the api endpoint or SSL setting", func() { Expect(Config.ApiEndpoint()).To(Equal("api.the-old-endpoint.com")) Expect(Config.IsSSLDisabled()).To(BeTrue()) })