@@ -101,7 +101,7 @@ module.exports.send = {
101101
102102 this . sendwithus . once ( 'request' , function ( method , url , headers , body ) {
103103 test . equals ( method , 'POST' , 'Correct HTTP method' ) ;
104- test . equals ( url , 'https://api.sendwithus.com/api/v1_0 /send' , 'Correct HTTP url' ) ;
104+ test . equals ( url , 'https://api.sendwithus.com/api/v1 /send' , 'Correct HTTP url' ) ;
105105 test . equals ( headers [ 'X-SWU-API-KEY' ] , API_KEY , 'Valid X-SWU-API-KEY' ) ;
106106 test . done ( ) ;
107107 } ) ;
@@ -135,7 +135,7 @@ module.exports.send = {
135135 }
136136} ;
137137
138- module . exports . emails = {
138+ module . exports . templates = {
139139 setUp : function ( callback ) {
140140 this . sendwithus = sendwithusFactory ( API_KEY ) ;
141141 this . sendwithusBad = sendwithusFactory ( INVALID_API_KEY ) ;
@@ -146,13 +146,13 @@ module.exports.emails = {
146146 callback ( ) ;
147147 } ,
148148 list : function ( test ) {
149- this . sendwithus . emails ( function ( err , result ) {
149+ this . sendwithus . templates ( function ( err , result ) {
150150 test . ifError ( err ) ;
151151 test . done ( ) ;
152152 } ) ;
153153 } ,
154154 listInvalidAPIKey : function ( test ) {
155- this . sendwithusBad . emails ( function ( err , result ) {
155+ this . sendwithusBad . templates ( function ( err , result ) {
156156 test . ok ( err , 'API Key was invalid' ) ;
157157 test . equals ( err . statusCode , 403 , 'Expected 403 status code' ) ;
158158 test . done ( ) ;
0 commit comments