Expect(newConfig.Receptor()).To(Equal("http://receptor.myapi.com")) }) It("clears out existing saved target credentials", func() { test_helpers.ExecuteCommandWithArgs(targetCommand, []string{"myapi.com"}) Expect(fakeTargetVerifier.VerifyTargetCallCount()).To(Equal(1)) Expect(fakeTargetVerifier.VerifyTargetArgsForCall(0)).To(Equal("http://receptor.myapi.com")) }) It("saves the new blob store target", func() { fakeBlobStoreVerifier.VerifyReturns(true, nil) test_helpers.ExecuteCommandWithArgs(targetCommand, []string{"myapi.com"}) Expect(fakeBlobStoreVerifier.VerifyCallCount()).To(Equal(1)) config := fakeBlobStoreVerifier.VerifyArgsForCall(0) blobStoreConfig := config.BlobStore() Expect(blobStoreConfig).To(Equal(config_package.BlobStoreConfig{ Host: "myapi.com", Port: "8444", })) newConfig := config_package.New(configPersister) Expect(newConfig.Load()).To(Succeed()) Expect(newConfig.BlobStore()).To(Equal(config_package.BlobStoreConfig{ Host: "myapi.com", Port: "8444", })) })