|
|
@@ -11,7 +11,7 @@ const {
|
|
|
createdEventInvalidEventId1,
|
|
|
} = require('../xml/event/js-requests');
|
|
|
|
|
|
-const { oadrPoll1 } = require('../xml/poll/js-requests');
|
|
|
+const { poll } = require('../xml/poll/js-requests');
|
|
|
|
|
|
const { generatedFromNantumEvent1 } = require('../xml/event/js-responses');
|
|
|
const { sampleEvent1 } = require('../modules/nantum-responses');
|
|
|
@@ -67,18 +67,18 @@ describe('Event', function() {
|
|
|
|
|
|
describe('poll and updateOptType', function() {
|
|
|
it('should return the same event on subsequent polls if it has not been opted', async () => {
|
|
|
- const venId = oadrPoll1.venId;
|
|
|
+ const venId = poll.venId;
|
|
|
const commonName = v4()
|
|
|
.replace(/-/g, '')
|
|
|
.substring(0, 12);
|
|
|
const pollResponse1 = await rewired.pollForEvents(
|
|
|
- oadrPoll1,
|
|
|
+ poll,
|
|
|
commonName,
|
|
|
venId,
|
|
|
);
|
|
|
expect(pollResponse1.events.length).to.eql(1);
|
|
|
const pollResponse2 = await rewired.pollForEvents(
|
|
|
- oadrPoll1,
|
|
|
+ poll,
|
|
|
commonName,
|
|
|
venId,
|
|
|
);
|
|
|
@@ -86,12 +86,12 @@ describe('Event', function() {
|
|
|
});
|
|
|
|
|
|
it('should not return an opted event in subsequent poll response', async () => {
|
|
|
- const venId = oadrPoll1.venId;
|
|
|
+ const venId = poll.venId;
|
|
|
const commonName = v4()
|
|
|
.replace(/-/g, '')
|
|
|
.substring(0, 12);
|
|
|
const pollResponse1 = await rewired.pollForEvents(
|
|
|
- oadrPoll1,
|
|
|
+ poll,
|
|
|
commonName,
|
|
|
venId,
|
|
|
);
|
|
|
@@ -99,7 +99,7 @@ describe('Event', function() {
|
|
|
|
|
|
await rewired.updateOptType(createdEventMax, commonName, venId);
|
|
|
const pollResponse2 = await rewired.pollForEvents(
|
|
|
- oadrPoll1,
|
|
|
+ poll,
|
|
|
commonName,
|
|
|
venId,
|
|
|
);
|
|
|
@@ -107,7 +107,7 @@ describe('Event', function() {
|
|
|
});
|
|
|
|
|
|
it('should fail when an invalid eventId is optedIn', async () => {
|
|
|
- const venId = oadrPoll1.venId;
|
|
|
+ const venId = poll.venId;
|
|
|
const commonName = v4()
|
|
|
.replace(/-/g, '')
|
|
|
.substring(0, 12);
|
|
|
@@ -124,7 +124,7 @@ describe('Event', function() {
|
|
|
});
|
|
|
|
|
|
it('should fail when an old modificationNumber is specified', async () => {
|
|
|
- const venId = oadrPoll1.venId;
|
|
|
+ const venId = poll.venId;
|
|
|
const commonName = v4()
|
|
|
.replace(/-/g, '')
|
|
|
.substring(0, 12);
|