Skip to content

Commit

Permalink
add sendTile/Toast, add test, udpate mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
tjanczuk committed Feb 20, 2013
1 parent b1ff948 commit 42a5aa2
Show file tree
Hide file tree
Showing 63 changed files with 665 additions and 528 deletions.
50 changes: 50 additions & 0 deletions lib/wns.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,56 @@ exports.sendRaw = function () {
return exports.send(channel, payload, 'wns/raw', options, callback);
}

// Send a tile or toast with multiple bindings to a WNS channel
// signature: (type, channel, payload+, [options], [callback])
// type - [required] 'tile' or 'toast'
// channel - [required] channel URI to send notification to
// payload - [required] one or more bindings specified as XML strings or JSON objects
// options - [optional] same as options for wns.send and wns.createTile combined into one object
// callback - [optional] same as callback for wns.send
var sendTileOrToast = function () {
var type = Array.prototype.shift.apply(arguments);
var channel = Array.prototype.shift.apply(arguments);
var callback;
if (arguments.length > 0 && typeof arguments[arguments.length - 1] === 'function'){
callback = arguments[arguments.length - 1];
Array.prototype.splice.call(arguments, -1, 1);
}

var options;
if (arguments.length > 0 && typeof arguments[arguments.length - 1] === 'object'
&& arguments[arguments.length - 1].type === undefined) {
options = arguments[arguments.length - 1];
}

Array.prototype.unshift.call(arguments, type);
var payload = createTileOrToast.apply(this, arguments);

return exports.send(channel, payload, 'wns/' + type, options, callback);
};

// Send a tile with multiple bindings to a WNS channel
// signature: (channel, payload+, [options], [callback])
// channel - [required] channel URI to send notification to
// payload - [required] one or more bindings specified as XML strings or JSON objects
// options - [optional] same as options for wns.send and wns.createTile combined into one object
// callback - [optional] same as callback for wns.send
exports.sendTile = function () {
Array.prototype.unshift.call(arguments, 'tile');
return sendTileOrToast.apply(this, arguments);
};

// Send a toast with multiple bindings to a WNS channel
// signature: (channel, payload+, [options], [callback])
// channel - [required] channel URI to send notification to
// payload - [required] one or more bindings specified as XML strings or JSON objects
// options - [optional] same as options for wns.send and wns.createTile combined into one object
// callback - [optional] same as callback for wns.send
exports.sendToast = function () {
Array.prototype.unshift.call(arguments, 'toast');
return sendTileOrToast.apply(this, arguments);
};

// Low level API to send any pre-formatted string notification payload to a WNS channel
// signature: (channel, payload, type, [options], [callback])
// channel - [required] channel URI to send notification to
Expand Down
18 changes: 9 additions & 9 deletions test/nock/Badge-success.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
exports.setupMockScopes = function (nock) { var scopes = []; var scope; scope =
nock('https://login.live.com:443')
.post('/accesstoken.srf', "grant_type=client_credentials&client_id=ms-app%3A%2F%2Fs-1-15-2-3004590818-3540041580-1964567292-460813795-2327965118-1902784169-2945106848&client_secret=N3icDsX5JXArJJR6AdTQZ86RITXQnMmA&scope=notify.windows.com")
.reply(200, "{\"token_type\":\"bearer\",\"access_token\":\"EgAfAQMAAAAEgAAACoAA+qnPqIaSGmBQGEypjXNAXkDNsEhg+TDHJkrOlM+ARbP37FrpvMV8pk7O1QNwzDZJsHpfKqtBMUyHjfaGwBUtK5KmMH9O2An4tnGuqt6PNur6Fc0PnkieVlfYM3bUgJN3TC26FRFx9Q1fZqtyMNB4hqmtbvXRsDFIFEUMnTXrvQWOAFoAjgAAAAAAys8LTInz4E+J8+BP60gEABAAMTMxLjEwNy4xNzQuMjQ4AAAAAABeAG1zLWFwcDovL3MtMS0xNS0yLTMwMDQ1OTA4MTgtMzU0MDA0MTU4MC0xOTY0NTY3MjkyLTQ2MDgxMzc5NS0yMzI3OTY1MTE4LTE5MDI3ODQxNjktMjk0NTEwNjg0OAA=\"}", { 'cache-control': 'no-store',
'content-length': '425',
.post('/accesstoken.srf', "grant_type=client_credentials&client_id=ms-app%3A%2F%2Fs-1-15-2-145565886-1510793020-2797717260-1526195933-3912359816-44086043-2211002316&client_secret=FF9yfJLxSH3uI32wNKGye643bAZ4zBz7&scope=notify.windows.com")
.reply(200, "{\"token_type\":\"bearer\",\"access_token\":\"EgAaAQMAAAAEgAAACoAA+Ays5tUe06g0m6+HyN0KSOp/ljf7BUTsqyKNPvYo0XLl29h5s/bm55aJOcS4RkUQFrWINYMVEqABeH9J9HcVtDCjisZnDCBhh9P+3vc9R+k09eM2bdlt90b8oq5MAafzv5BvHN66jFykHb/1HZutczxffmhsY6GpzO15yKj+w0SJAFoAiQAAAAAAaoEORM1JJFHNSSRR60gEAA0ANjcuMTg1LjE0OC44AAAAAABcAG1zLWFwcDovL3MtMS0xNS0yLTE0NTU2NTg4Ni0xNTEwNzkzMDIwLTI3OTc3MTcyNjAtMTUyNjE5NTkzMy0zOTEyMzU5ODE2LTQ0MDg2MDQzLTIyMTEwMDIzMTYA\",\"expires_in\":86400}", { 'cache-control': 'no-store',
'content-length': '436',
'content-type': 'application/json',
server: 'Microsoft-IIS/7.5',
ppserver: 'PPV: 30 H: BAYIDSLGN1E28 V: 0',
date: 'Tue, 19 Jun 2012 21:47:52 GMT',
ppserver: 'PPV: 30 H: BAYIDSLGN1F01 V: 0',
date: 'Wed, 20 Feb 2013 03:58:05 GMT',
connection: 'close' });
scopes.push(scope);scope =
nock('https://bn1.notify.windows.com:443')
.post('/?token=AgUAAACQRWJECxiyMVoNBsJefU%2bZypA7bASncWnSeSP9WA2zBXKnyb1%2fWUCg%2bTr7%2fspFEBK0b25eCDYgxdjVq%2bCoqqz6P68y6uLsnlnDtRbig9dzDWM30D5BNI7PmG7H7vsgCSU%3d', "<badge value=\"alert\" version=\"1\"/>")
.post('/?token=AgYAAACFGdWBiRCTypHebfvngI7DuNBXWuGjdiczDOZ7bSgkbCRrD2M1b10CpzCmipzknHbU4nLzapQbooXzJ%2fVwHAfSl%2fWMk8OsetohEVMlsIicoLP99rDg7g2AdENA99DZoAU%3d', "<badge value=\"alert\" version=\"1\"/>")
.reply(200, "", { 'content-length': '0',
'x-wns-notificationstatus': 'received',
'x-wns-msg-id': '23C925E76874C018',
'x-wns-debug-trace': 'BN1WNS1011834',
date: 'Tue, 19 Jun 2012 21:47:53 GMT' });
'x-wns-msg-id': '239010302BCD93DF',
'x-wns-debug-trace': 'BN1WNS2011532',
date: 'Wed, 20 Feb 2013 03:58:05 GMT' });
scopes.push(scope);return scopes; };
18 changes: 9 additions & 9 deletions test/nock/Raw-success.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
exports.setupMockScopes = function (nock) { var scopes = []; var scope; scope =
nock('https://login.live.com:443')
.post('/accesstoken.srf', "grant_type=client_credentials&client_id=ms-app%3A%2F%2Fs-1-15-2-3004590818-3540041580-1964567292-460813795-2327965118-1902784169-2945106848&client_secret=N3icDsX5JXArJJR6AdTQZ86RITXQnMmA&scope=notify.windows.com")
.reply(200, "{\"token_type\":\"bearer\",\"access_token\":\"EgAfAQMAAAAEgAAACoAAUj1knmBqI7AlWv9cbjrta9pN068UVLSaZ3mQaf46gdQgMEsMhwL51665N7gesqhKPfKPEVV4eaaR2dcaX8Kcl6UfAkYsCCfHRnq8L9bB79N9m5avQrNNrx1cTUS8KVg1vxsbeiCeC3gUFtuGz+P45BltJlfL/ooYaGmwA2Mxq2KOAFoAjgAAAAAAys8LTFD24E9Q9uBP60gEABAAMTMxLjEwNy4xNzQuMjQ4AAAAAABeAG1zLWFwcDovL3MtMS0xNS0yLTMwMDQ1OTA4MTgtMzU0MDA0MTU4MC0xOTY0NTY3MjkyLTQ2MDgxMzc5NS0yMzI3OTY1MTE4LTE5MDI3ODQxNjktMjk0NTEwNjg0OAA=\"}", { 'cache-control': 'no-store',
'content-length': '425',
.post('/accesstoken.srf', "grant_type=client_credentials&client_id=ms-app%3A%2F%2Fs-1-15-2-145565886-1510793020-2797717260-1526195933-3912359816-44086043-2211002316&client_secret=FF9yfJLxSH3uI32wNKGye643bAZ4zBz7&scope=notify.windows.com")
.reply(200, "{\"token_type\":\"bearer\",\"access_token\":\"EgAaAQMAAAAEgAAACoAAOrNVOV8gBykbF0V1rYpuU8D0+h5feuJIX1iHI9YC8b3Oqs/nPVR4duootcLOct3elJjwrJ+PpRQ1ckueVKSgBqUZnfeRqKwFXSRXLMEkHM9YzCR8oCNLCX4iEaBuwRYRrWDCJpSRvFPQuZHlCxw/bHstZIIe8nMOsuZ2ja6hZQuJAFoAiQAAAAAAaoEOROJJJFHiSSRR60gEAA0ANjcuMTg1LjE0OC44AAAAAABcAG1zLWFwcDovL3MtMS0xNS0yLTE0NTU2NTg4Ni0xNTEwNzkzMDIwLTI3OTc3MTcyNjAtMTUyNjE5NTkzMy0zOTEyMzU5ODE2LTQ0MDg2MDQzLTIyMTEwMDIzMTYA\",\"expires_in\":86400}", { 'cache-control': 'no-store',
'content-length': '436',
'content-type': 'application/json',
server: 'Microsoft-IIS/7.5',
ppserver: 'PPV: 30 H: BAYIDSLGN1F16 V: 0',
date: 'Tue, 19 Jun 2012 21:59:43 GMT',
ppserver: 'PPV: 30 H: BAYIDSLGN1F23 V: 0',
date: 'Wed, 20 Feb 2013 03:58:25 GMT',
connection: 'close' });
scopes.push(scope);scope =
nock('https://bn1.notify.windows.com:443')
.post('/?token=AgUAAACQRWJECxiyMVoNBsJefU%2bZypA7bASncWnSeSP9WA2zBXKnyb1%2fWUCg%2bTr7%2fspFEBK0b25eCDYgxdjVq%2bCoqqz6P68y6uLsnlnDtRbig9dzDWM30D5BNI7PmG7H7vsgCSU%3d', "abc", { 'Content-Type': 'application/octet-stream', 'X-WNS-Type': 'wns/raw'})
.post('/?token=AgYAAACFGdWBiRCTypHebfvngI7DuNBXWuGjdiczDOZ7bSgkbCRrD2M1b10CpzCmipzknHbU4nLzapQbooXzJ%2fVwHAfSl%2fWMk8OsetohEVMlsIicoLP99rDg7g2AdENA99DZoAU%3d', "abc")
.reply(200, "", { 'content-length': '0',
'x-wns-notificationstatus': 'received',
'x-wns-msg-id': '7828E60359D06CDC',
'x-wns-debug-trace': 'BN1WNS1011131',
date: 'Tue, 19 Jun 2012 21:59:44 GMT' });
'x-wns-msg-id': '3BE4E575385F67FE',
'x-wns-debug-trace': 'BN1WNS2011532',
date: 'Wed, 20 Feb 2013 03:58:25 GMT' });
scopes.push(scope);return scopes; };
18 changes: 9 additions & 9 deletions test/nock/Send-success.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
exports.setupMockScopes = function (nock) { var scopes = []; var scope; scope =
nock('https://login.live.com:443')
.post('/accesstoken.srf', "grant_type=client_credentials&client_id=ms-app%3A%2F%2Fs-1-15-2-3004590818-3540041580-1964567292-460813795-2327965118-1902784169-2945106848&client_secret=N3icDsX5JXArJJR6AdTQZ86RITXQnMmA&scope=notify.windows.com")
.reply(200, "{\"token_type\":\"bearer\",\"access_token\":\"EgAfAQMAAAAEgAAACoAAUj1knmBqI7AlWv9cbjrta9pN068UVLSaZ3mQaf46gdQgMEsMhwL51665N7gesqhKPfKPEVV4eaaR2dcaX8Kcl6UfAkYsCCfHRnq8L9bB79N9m5avQrNNrx1cTUS8KVg1vxsbeiCeC3gUFtuGz+P45BltJlfL/ooYaGmwA2Mxq2KOAFoAjgAAAAAAys8LTFD24E9Q9uBP60gEABAAMTMxLjEwNy4xNzQuMjQ4AAAAAABeAG1zLWFwcDovL3MtMS0xNS0yLTMwMDQ1OTA4MTgtMzU0MDA0MTU4MC0xOTY0NTY3MjkyLTQ2MDgxMzc5NS0yMzI3OTY1MTE4LTE5MDI3ODQxNjktMjk0NTEwNjg0OAA=\"}", { 'cache-control': 'no-store',
'content-length': '425',
.post('/accesstoken.srf', "grant_type=client_credentials&client_id=ms-app%3A%2F%2Fs-1-15-2-145565886-1510793020-2797717260-1526195933-3912359816-44086043-2211002316&client_secret=FF9yfJLxSH3uI32wNKGye643bAZ4zBz7&scope=notify.windows.com")
.reply(200, "{\"token_type\":\"bearer\",\"access_token\":\"EgAaAQMAAAAEgAAACoAA2j5nv50/LmqoVgh1PLNB5R4VrcKRi7KXUIjORdcUFGa/nlVslWjuJBhF9Tu4l8vvAI5icJaVqjORqZsMwBO7ga5OpTBNvcNtG7bJ0DShrr7ZTzRnA96aLFVC2imwh8cRFPjp0GPsmmqeolSqkm1JeGWPSyW8V5Mz/kIgdfGIEH+JAFoAiQAAAAAAaoEORPVJJFH1SSRR60gEAA0ANjcuMTg1LjE0OC44AAAAAABcAG1zLWFwcDovL3MtMS0xNS0yLTE0NTU2NTg4Ni0xNTEwNzkzMDIwLTI3OTc3MTcyNjAtMTUyNjE5NTkzMy0zOTEyMzU5ODE2LTQ0MDg2MDQzLTIyMTEwMDIzMTYA\",\"expires_in\":86400}", { 'cache-control': 'no-store',
'content-length': '436',
'content-type': 'application/json',
server: 'Microsoft-IIS/7.5',
ppserver: 'PPV: 30 H: BAYIDSLGN1F16 V: 0',
date: 'Tue, 19 Jun 2012 21:59:43 GMT',
ppserver: 'PPV: 30 H: BAYIDSLGN1F37 V: 0',
date: 'Wed, 20 Feb 2013 03:58:45 GMT',
connection: 'close' });
scopes.push(scope);scope =
nock('https://bn1.notify.windows.com:443')
.post('/?token=AgUAAACQRWJECxiyMVoNBsJefU%2bZypA7bASncWnSeSP9WA2zBXKnyb1%2fWUCg%2bTr7%2fspFEBK0b25eCDYgxdjVq%2bCoqqz6P68y6uLsnlnDtRbig9dzDWM30D5BNI7PmG7H7vsgCSU%3d', "<tile><visual><binding template=\"TileSquareBlock\"><text id=\"1\">http://textParam1.com</text><text id=\"2\">http://textParam2.com</text></binding></visual></tile>")
.post('/?token=AgYAAACFGdWBiRCTypHebfvngI7DuNBXWuGjdiczDOZ7bSgkbCRrD2M1b10CpzCmipzknHbU4nLzapQbooXzJ%2fVwHAfSl%2fWMk8OsetohEVMlsIicoLP99rDg7g2AdENA99DZoAU%3d', "<tile><visual><binding template=\"TileSquareBlock\"><text id=\"1\">http://textParam1.com</text><text id=\"2\">http://textParam2.com</text></binding></visual></tile>")
.reply(200, "", { 'content-length': '0',
'x-wns-notificationstatus': 'received',
'x-wns-msg-id': '7828E60359D06CDC',
'x-wns-debug-trace': 'BN1WNS1011131',
date: 'Tue, 19 Jun 2012 21:59:44 GMT' });
'x-wns-msg-id': '45DC47913C88B26E',
'x-wns-debug-trace': 'BN1WNS2011530',
date: 'Wed, 20 Feb 2013 03:58:45 GMT' });
scopes.push(scope);return scopes; };
18 changes: 9 additions & 9 deletions test/nock/SendToastText01WithAudioAndToastOptions-success.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
exports.setupMockScopes = function (nock) { var scopes = []; var scope; scope =
nock('https://login.live.com:443')
.post('/accesstoken.srf', "grant_type=client_credentials&client_id=ms-app%3A%2F%2Fs-1-15-2-3004590818-3540041580-1964567292-460813795-2327965118-1902784169-2945106848&client_secret=N3icDsX5JXArJJR6AdTQZ86RITXQnMmA&scope=notify.windows.com")
.reply(200, "{\"token_type\":\"bearer\",\"access_token\":\"EgAfAQMAAAAEgAAACoAATfd5j9D1pkXsVybLNJx71pgoIlbl2teVxIXzOHJjJbulDrrDieBPc+1Wu49ewv81bAiPako5cLhp87wLzBSiGPIN0Aj3+mckRaSguNcKkCzPJ4O5YmoLxSwFKVpQcw5r5+dSAXxvnWtv2P3a3eB/1+mOeQeHCbWFmgmT8vbQkdWOAFoAjgAAAAAAys8LTEBy4k9AcuJP60gEABAAMTMxLjEwNy4xNzQuMjQ4AAAAAABeAG1zLWFwcDovL3MtMS0xNS0yLTMwMDQ1OTA4MTgtMzU0MDA0MTU4MC0xOTY0NTY3MjkyLTQ2MDgxMzc5NS0yMzI3OTY1MTE4LTE5MDI3ODQxNjktMjk0NTEwNjg0OAA=\"}", { 'cache-control': 'no-store',
'content-length': '425',
.post('/accesstoken.srf', "grant_type=client_credentials&client_id=ms-app%3A%2F%2Fs-1-15-2-145565886-1510793020-2797717260-1526195933-3912359816-44086043-2211002316&client_secret=FF9yfJLxSH3uI32wNKGye643bAZ4zBz7&scope=notify.windows.com")
.reply(200, "{\"token_type\":\"bearer\",\"access_token\":\"EgAaAQMAAAAEgAAACoAAthLhpiAnq28mv/cy7eyJOn6G2hUkhuCvrVB93anVYpnsltQ6MEvv6Xr/nXW5AIR27b+IyF/KYedDEE+2NOBgMAVAlnYMoPg+DI1OmtP/Eu4fowNZF9p/ME76OEAE1vy7IybdYYsj8cF7gnxgckg+uLH3oDrz6qM21WZRoSREGlGJAFoAiQAAAAAAaoEORCVKJFElSiRR60gEAA0ANjcuMTg1LjE0OC44AAAAAABcAG1zLWFwcDovL3MtMS0xNS0yLTE0NTU2NTg4Ni0xNTEwNzkzMDIwLTI3OTc3MTcyNjAtMTUyNjE5NTkzMy0zOTEyMzU5ODE2LTQ0MDg2MDQzLTIyMTEwMDIzMTYA\",\"expires_in\":86400}", { 'cache-control': 'no-store',
'content-length': '436',
'content-type': 'application/json',
server: 'Microsoft-IIS/7.5',
ppserver: 'PPV: 30 H: BAYIDSLGN1Q29 V: 0',
date: 'Thu, 21 Jun 2012 01:00:48 GMT',
ppserver: 'PPV: 30 H: BAYIDSLGN2G030 V: 0',
date: 'Wed, 20 Feb 2013 03:59:32 GMT',
connection: 'close' });
scopes.push(scope);scope =
nock('https://bn1.notify.windows.com:443')
.post('/?token=AgUAAACQRWJECxiyMVoNBsJefU%2bZypA7bASncWnSeSP9WA2zBXKnyb1%2fWUCg%2bTr7%2fspFEBK0b25eCDYgxdjVq%2bCoqqz6P68y6uLsnlnDtRbig9dzDWM30D5BNI7PmG7H7vsgCSU%3d', "<toast duration=\"long\" launch=\"some random parameter passed to the application\"><visual><binding template=\"ToastText01\"><text id=\"1\">A toast!</text></binding></visual><audio src=\"ms-winsoundevent:Notification.Alarm\" loop=\"true\"/></toast>")
.post('/?token=AgYAAACFGdWBiRCTypHebfvngI7DuNBXWuGjdiczDOZ7bSgkbCRrD2M1b10CpzCmipzknHbU4nLzapQbooXzJ%2fVwHAfSl%2fWMk8OsetohEVMlsIicoLP99rDg7g2AdENA99DZoAU%3d', "<toast duration=\"long\" launch=\"some random parameter passed to the application\"><visual><binding template=\"ToastText01\"><text id=\"1\">A toast!</text></binding></visual><audio src=\"ms-winsoundevent:Notification.Alarm\" loop=\"true\"/></toast>")
.reply(200, "", { 'content-length': '0',
'x-wns-notificationstatus': 'received',
'x-wns-msg-id': '33F71B204DAA6CF0',
'x-wns-debug-trace': 'BN1WNS1011838',
date: 'Thu, 21 Jun 2012 01:00:49 GMT' });
'x-wns-msg-id': '7CFCFDFF27001588',
'x-wns-debug-trace': 'BN1WNS1011735',
date: 'Wed, 20 Feb 2013 03:59:34 GMT' });
scopes.push(scope);return scopes; };
18 changes: 9 additions & 9 deletions test/nock/TileSquareBlock-success.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
exports.setupMockScopes = function (nock) { var scopes = []; var scope; scope =
nock('https://login.live.com:443')
.post('/accesstoken.srf', "grant_type=client_credentials&client_id=ms-app%3A%2F%2Fs-1-15-2-3004590818-3540041580-1964567292-460813795-2327965118-1902784169-2945106848&client_secret=N3icDsX5JXArJJR6AdTQZ86RITXQnMmA&scope=notify.windows.com")
.reply(200, "{\"token_type\":\"bearer\",\"access_token\":\"EgAfAQMAAAAEgAAACoAAJyqEhdhvwx7KEYHgzMdnCsmhuA9rH1/Yi5unfMzUTjicY0e5o8fopC2m6RYFMo9ovW97vxvj/lt1eAHW/3ksxQ+92Jo0HfnzUu2ZST43Bf641gXRMGTi67BvA0PaVgKI5hjVvhYgWmIwqICvfFP/Tqy+EyjCA4QWxES2ffP5TlmOAFoAjgAAAAAAys8LTKPl4E+j5eBP60gEABAAMTMxLjEwNy4xNzQuMjQ4AAAAAABeAG1zLWFwcDovL3MtMS0xNS0yLTMwMDQ1OTA4MTgtMzU0MDA0MTU4MC0xOTY0NTY3MjkyLTQ2MDgxMzc5NS0yMzI3OTY1MTE4LTE5MDI3ODQxNjktMjk0NTEwNjg0OAA=\"}", { 'cache-control': 'no-store',
'content-length': '425',
.post('/accesstoken.srf', "grant_type=client_credentials&client_id=ms-app%3A%2F%2Fs-1-15-2-145565886-1510793020-2797717260-1526195933-3912359816-44086043-2211002316&client_secret=FF9yfJLxSH3uI32wNKGye643bAZ4zBz7&scope=notify.windows.com")
.reply(200, "{\"token_type\":\"bearer\",\"access_token\":\"EgAaAQMAAAAEgAAACoAAjIbTx8h986szWfACFJaf51smKCHFAazqH2ucwlVKy1UK+6Hep4IEvkQ912/EJWr6OurgHBUvFQEJXs+OoU5fU5aFNwvtu68MG3LaayAEojC56WbdMYQbUz12qxHN2wjLSoFm+qAwIvEkOajC/DjLVwnADXjWTUhsH8EJBo0DMmCJAFoAiQAAAAAAaoEORNRKJFHUSiRR60gEAA0ANjcuMTg1LjE0OC44AAAAAABcAG1zLWFwcDovL3MtMS0xNS0yLTE0NTU2NTg4Ni0xNTEwNzkzMDIwLTI3OTc3MTcyNjAtMTUyNjE5NTkzMy0zOTEyMzU5ODE2LTQ0MDg2MDQzLTIyMTEwMDIzMTYA\",\"expires_in\":86400}", { 'cache-control': 'no-store',
'content-length': '436',
'content-type': 'application/json',
server: 'Microsoft-IIS/7.5',
ppserver: 'PPV: 30 H: BAYIDSLGN1K58 V: 0',
date: 'Tue, 19 Jun 2012 20:48:35 GMT',
ppserver: 'PPV: 30 H: BAYIDSLGN1P52 V: 0',
date: 'Wed, 20 Feb 2013 04:02:28 GMT',
connection: 'close' });
scopes.push(scope);scope =
nock('https://bn1.notify.windows.com:443')
.post('/?token=AgUAAACQRWJECxiyMVoNBsJefU%2bZypA7bASncWnSeSP9WA2zBXKnyb1%2fWUCg%2bTr7%2fspFEBK0b25eCDYgxdjVq%2bCoqqz6P68y6uLsnlnDtRbig9dzDWM30D5BNI7PmG7H7vsgCSU%3d', "<tile><visual><binding template=\"TileSquareBlock\"><text id=\"1\">http://textParam1.com</text><text id=\"2\">http://textParam2.com</text></binding></visual></tile>")
.post('/?token=AgYAAACFGdWBiRCTypHebfvngI7DuNBXWuGjdiczDOZ7bSgkbCRrD2M1b10CpzCmipzknHbU4nLzapQbooXzJ%2fVwHAfSl%2fWMk8OsetohEVMlsIicoLP99rDg7g2AdENA99DZoAU%3d', "<tile><visual><binding template=\"TileSquareBlock\"><text id=\"1\">http://textParam1.com</text><text id=\"2\">http://textParam2.com</text></binding></visual></tile>")
.reply(200, "", { 'content-length': '0',
'x-wns-notificationstatus': 'received',
'x-wns-msg-id': '5CC9F1F72FA4A370',
'x-wns-debug-trace': 'BN1WNS1011329',
date: 'Tue, 19 Jun 2012 20:48:36 GMT' });
'x-wns-msg-id': '25DA1E3768E556C3',
'x-wns-debug-trace': 'BN1WNS2011733',
date: 'Wed, 20 Feb 2013 04:02:29 GMT' });
scopes.push(scope);return scopes; };
Loading

0 comments on commit 42a5aa2

Please sign in to comment.