@@ -316,7 +316,12 @@ describe("Customers Endpoint", function () {
316316describe ( "Drip Campaigns Endpoint" , function ( ) {
317317 beforeEach ( function ( ) {
318318 this . sendwithus = sendwithusFactory ( API_KEY ) ;
319- this . recipientData = {
319+ this . recipientActivateData = {
320+ recipient : {
321+ 322+ }
323+ } ;
324+ this . recipientDeactivateData = {
320325 recipient_address :
"[email protected] " , 321326 } ;
322327 } ) ;
@@ -336,7 +341,7 @@ describe("Drip Campaigns Endpoint", function () {
336341 it ( "should activate a recipient successfully" , function ( done ) {
337342 this . sendwithus . dripCampaignActivate (
338343 ENABLED_DRIP_ID ,
339- this . recipientData ,
344+ this . recipientActivateData ,
340345 function ( err , result ) {
341346 try {
342347 assert . ifError ( err ) ;
@@ -352,7 +357,7 @@ describe("Drip Campaigns Endpoint", function () {
352357 it ( "should return an error (400) when activating on an inactive drip campaign" , function ( done ) {
353358 this . sendwithus . dripCampaignActivate (
354359 DISABLED_DRIP_ID ,
355- this . recipientData ,
360+ this . recipientActivateData ,
356361 function ( err , response ) {
357362 try {
358363 assert . ok ( err , "Error was thrown" ) ;
@@ -373,7 +378,7 @@ describe("Drip Campaigns Endpoint", function () {
373378 it ( "should return an error (400) when activating on a drip campaign that does not exist" , function ( done ) {
374379 this . sendwithus . dripCampaignActivate (
375380 FALSE_DRIP_ID ,
376- this . recipientData ,
381+ this . recipientActivateData ,
377382 function ( err , response ) {
378383 try {
379384 assert . ok ( err , "Error was thrown" ) ;
@@ -391,13 +396,11 @@ describe("Drip Campaigns Endpoint", function () {
391396 ) ;
392397 } ) ;
393398
394- it . skip ( "should deactivate a recipient successfully" , function ( done ) {
395- // SendWithUs currently returns a 405 METHOD NOT ALLOWED error for this endpoint.
399+ it ( "should deactivate a recipient successfully" , function ( done ) {
396400 this . sendwithus . dripCampaignDeactivate (
397401 ENABLED_DRIP_ID ,
398- this . recipientData ,
402+ this . recipientDeactivateData ,
399403 function ( err , result ) {
400- console . log ( err )
401404 try {
402405 assert . ifError ( err ) ;
403406 assert . ok ( result . success , "Response was successful" ) ;
@@ -411,7 +414,7 @@ describe("Drip Campaigns Endpoint", function () {
411414
412415 it ( "should deactivate all drip campaigns for recipient successfully" , function ( done ) {
413416 this . sendwithus . dripCampaignDeactivateAll (
414- this . recipientData ,
417+ this . recipientDeactivateData ,
415418 function ( err , result ) {
416419 try {
417420 assert . ifError ( err ) ;
0 commit comments