You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://circleci.com/gh/andrewshell/rsscloud-server/tree/2.x)
[](https://circleci.com/gh/rsscloud/rsscloud-server/tree/2.x)
@@ -94,10 +106,14 @@ for (const pingProtocol of ['REST']) {
94
106
95
107
expect(res).status(200);
96
108
97
-
if('JSON'===returnFormat){
98
-
expect(res.body).deep.equal({success: true,msg: `Thanks for the registration. It worked. When the resource updates we\'ll notify you. Don\'t forget to re-register after 24 hours, your subscription will expire in 25. Keep on truckin!`});
expect(res.text).xml.equal('<notifyResult success="true" msg="Thanks for the registration. It worked. When the resource updates we\'ll notify you. Don\'t forget to re-register after 24 hours, your subscription will expire in 25. Keep on truckin!"/>');
112
+
if('JSON'===returnFormat){
113
+
expect(res.body).deep.equal({success: true,msg: `Thanks for the registration. It worked. When the resource updates we\'ll notify you. Don\'t forget to re-register after 24 hours, your subscription will expire in 25. Keep on truckin!`});
114
+
}else{
115
+
expect(res.text).xml.equal('<notifyResult success="true" msg="Thanks for the registration. It worked. When the resource updates we\'ll notify you. Don\'t forget to re-register after 24 hours, your subscription will expire in 25. Keep on truckin!"/>');
116
+
}
101
117
}
102
118
103
119
expect(mock.requests.GET).property(feedPath).lengthOf(1,`Missing GET ${feedPath}`);
@@ -123,14 +139,24 @@ for (const pingProtocol of ['REST']) {
mock.route('POST',pingPath,200,'Thanks for the update! :-)');
136
162
mock.rpc(notifyProcedure,rpcReturnSuccess(true));
@@ -139,10 +165,14 @@ for (const pingProtocol of ['REST']) {
139
165
140
166
expect(res).status(200);
141
167
142
-
if('JSON'===returnFormat){
143
-
expect(res.body).deep.equal({success: true,msg: `Thanks for the registration. It worked. When the resource updates we\'ll notify you. Don\'t forget to re-register after 24 hours, your subscription will expire in 25. Keep on truckin!`});
expect(res.text).xml.equal('<notifyResult success="true" msg="Thanks for the registration. It worked. When the resource updates we\'ll notify you. Don\'t forget to re-register after 24 hours, your subscription will expire in 25. Keep on truckin!"/>');
171
+
if('JSON'===returnFormat){
172
+
expect(res.body).deep.equal({success: true,msg: `Thanks for the registration. It worked. When the resource updates we\'ll notify you. Don\'t forget to re-register after 24 hours, your subscription will expire in 25. Keep on truckin!`});
173
+
}else{
174
+
expect(res.text).xml.equal('<notifyResult success="true" msg="Thanks for the registration. It worked. When the resource updates we\'ll notify you. Don\'t forget to re-register after 24 hours, your subscription will expire in 25. Keep on truckin!"/>');
175
+
}
146
176
}
147
177
148
178
expect(mock.requests.GET).property(feedPath).lengthOf(1,`Missing GET ${feedPath}`);
@@ -168,14 +198,24 @@ for (const pingProtocol of ['REST']) {
mock.route('POST',pingPath,200,'Thanks for the update! :-)');
181
221
mock.rpc(notifyProcedure,rpcReturnSuccess(true));
@@ -184,10 +224,14 @@ for (const pingProtocol of ['REST']) {
184
224
185
225
expect(res).status(200);
186
226
187
-
if('JSON'===returnFormat){
188
-
expect(res.body).deep.equal({success: false,msg: `The subscription was cancelled because there was an error reading the resource at URL ${resourceUrl}.`});
227
+
if('XML-RPC'===pingProtocol){
228
+
expect(res.text).xml.equal(rpcReturnFault(4,`The subscription was cancelled because there was an error reading the resource at URL ${resourceUrl}.`));
189
229
}else{
190
-
expect(res.text).xml.equal(`<notifyResult success="false" msg="The subscription was cancelled because there was an error reading the resource at URL ${resourceUrl}."/>`);
230
+
if('JSON'===returnFormat){
231
+
expect(res.body).deep.equal({success: false,msg: `The subscription was cancelled because there was an error reading the resource at URL ${resourceUrl}.`});
232
+
}else{
233
+
expect(res.text).xml.equal(`<notifyResult success="false" msg="The subscription was cancelled because there was an error reading the resource at URL ${resourceUrl}."/>`);
234
+
}
191
235
}
192
236
193
237
expect(mock.requests.GET).property(feedPath).lengthOf(1,`Missing GET ${feedPath}`);
0 commit comments