public void CanSubscribeNewSubscriberToCampaignAndThenUnsubscribeFromAll() { var newSubscriber = subscriberFactoryFixture.GetRandomEmailAddress(); var campaignRequest = new ModifyDripCampaignSubscriberRequest { Email = newSubscriber }; var result = dripClientFixture.Client.SubscribeToCampaign(TestCampaignId, campaignRequest); DripAssert.Success(result, HttpStatusCode.Created); var subscriberResult = dripClientFixture.Client.GetSubscriber(newSubscriber); DripAssert.Success(subscriberResult); subscriberResult = dripClientFixture.Client.UnsubscribeFromCampaign(newSubscriber); //TODO: this is a mismatch with the docs. Docs say it will be "200 OK" DripAssert.Success(result, HttpStatusCode.Created); }
public void CanSubscribeExistingSubscriberToCampaignAndThenUnsubscribe() { var subscriber = subscriberFactoryFixture.CreateComplexUniqueModifyDripSubscriber(); var subscriberResult = dripClientFixture.Client.CreateOrUpdateSubscriber(subscriber); DripAssert.Success(subscriberResult); var campaignRequest = new ModifyDripCampaignSubscriberRequest { Email = subscriber.Email }; var result = dripClientFixture.Client.SubscribeToCampaign(TestCampaignId, campaignRequest); DripAssert.Success(result, HttpStatusCode.Created); subscriberResult = dripClientFixture.Client.UnsubscribeFromCampaign(subscriber.Email, TestCampaignId); //TODO: this is a mismatch with the docs. Docs say it will be "200 OK" DripAssert.Success(result, HttpStatusCode.Created); }