|
|
@@ -33,7 +33,7 @@ describe('VEN registration', function() {
|
|
|
requestId: requestId,
|
|
|
venId: venId,
|
|
|
oadrProfileName: '2.0b',
|
|
|
- oadrTransportName: 'simplehttp',
|
|
|
+ oadrTransportName: 'simpleHttp',
|
|
|
oadrReportOnly: false,
|
|
|
oadrXmlSignature: false,
|
|
|
oadrVenName: `VEN ${commonName}`,
|
|
|
@@ -61,7 +61,7 @@ describe('VEN registration', function() {
|
|
|
requestId: requestId,
|
|
|
venId: venId,
|
|
|
oadrProfileName: '2.0b',
|
|
|
- oadrTransportName: 'simplehttp',
|
|
|
+ oadrTransportName: 'simpleHttp',
|
|
|
oadrReportOnly: false,
|
|
|
oadrXmlSignature: false,
|
|
|
oadrVenName: `VEN ${commonName}`,
|
|
|
@@ -88,7 +88,7 @@ describe('VEN registration', function() {
|
|
|
requestId: requestId,
|
|
|
venId: venId,
|
|
|
oadrProfileName: '2.0b',
|
|
|
- oadrTransportName: 'simplehttp',
|
|
|
+ oadrTransportName: 'simpleHttp',
|
|
|
oadrReportOnly: false,
|
|
|
oadrXmlSignature: false,
|
|
|
oadrVenName: `VEN ${commonName}`,
|
|
|
@@ -147,7 +147,7 @@ describe('VEN registration', function() {
|
|
|
requestId: requestId,
|
|
|
venId: venId,
|
|
|
oadrProfileName: '2.0b',
|
|
|
- oadrTransportName: 'simplehttp',
|
|
|
+ oadrTransportName: 'simpleHttp',
|
|
|
oadrReportOnly: false,
|
|
|
oadrXmlSignature: false,
|
|
|
oadrVenName: `VEN ${commonName}`,
|
|
|
@@ -167,6 +167,70 @@ describe('VEN registration', function() {
|
|
|
expect(queryResponse.registrationId).to.eql(initialRegistrationId);
|
|
|
expect(queryResponse.venId).to.eql(venId);
|
|
|
});
|
|
|
+
|
|
|
+ it('rejects XMPP client', async () => {
|
|
|
+ venId = v4()
|
|
|
+ .replace(/-/g, '')
|
|
|
+ .substring(0, 20)
|
|
|
+ .toUpperCase()
|
|
|
+ .match(/.{2}/g)
|
|
|
+ .join(':');
|
|
|
+ const requestId = v4().replace(/-/g, '');
|
|
|
+ commonName = v4()
|
|
|
+ .replace(/-/g, '')
|
|
|
+ .substring(0, 12);
|
|
|
+ const registerRequest = {
|
|
|
+ requestId: requestId,
|
|
|
+ venId: venId,
|
|
|
+ oadrProfileName: '2.0b',
|
|
|
+ oadrTransportName: 'xmpp',
|
|
|
+ oadrReportOnly: false,
|
|
|
+ oadrXmlSignature: false,
|
|
|
+ oadrVenName: `VEN ${commonName}`,
|
|
|
+ oadrHttpPullModel: true,
|
|
|
+ };
|
|
|
+
|
|
|
+ let lastError;
|
|
|
+ try {
|
|
|
+ await registerParty(registerRequest, commonName, venId);
|
|
|
+ } catch (e) {
|
|
|
+ lastError = e;
|
|
|
+ }
|
|
|
+ expect(lastError).to.be.an('error');
|
|
|
+ expect(lastError.message).to.eql('Transport name must be simpleHttp');
|
|
|
+ });
|
|
|
+
|
|
|
+ it('rejects 2.0a client', async () => {
|
|
|
+ venId = v4()
|
|
|
+ .replace(/-/g, '')
|
|
|
+ .substring(0, 20)
|
|
|
+ .toUpperCase()
|
|
|
+ .match(/.{2}/g)
|
|
|
+ .join(':');
|
|
|
+ const requestId = v4().replace(/-/g, '');
|
|
|
+ commonName = v4()
|
|
|
+ .replace(/-/g, '')
|
|
|
+ .substring(0, 12);
|
|
|
+ const registerRequest = {
|
|
|
+ requestId: requestId,
|
|
|
+ venId: venId,
|
|
|
+ oadrProfileName: '2.0a',
|
|
|
+ oadrTransportName: 'simpleHttp',
|
|
|
+ oadrReportOnly: false,
|
|
|
+ oadrXmlSignature: false,
|
|
|
+ oadrVenName: `VEN ${commonName}`,
|
|
|
+ oadrHttpPullModel: true,
|
|
|
+ };
|
|
|
+
|
|
|
+ let lastError;
|
|
|
+ try {
|
|
|
+ await registerParty(registerRequest, commonName, venId);
|
|
|
+ } catch (e) {
|
|
|
+ lastError = e;
|
|
|
+ }
|
|
|
+ expect(lastError).to.be.an('error');
|
|
|
+ expect(lastError.message).to.eql('Profile name must be 2.0b');
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
describe('cancelParty', function() {
|
|
|
@@ -187,7 +251,7 @@ describe('VEN registration', function() {
|
|
|
requestId: requestId,
|
|
|
venId: venId,
|
|
|
oadrProfileName: '2.0b',
|
|
|
- oadrTransportName: 'simplehttp',
|
|
|
+ oadrTransportName: 'simpleHttp',
|
|
|
oadrReportOnly: false,
|
|
|
oadrXmlSignature: false,
|
|
|
oadrVenName: `VEN ${commonName}`,
|