Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAustin Schaffer <austin.schaffer@ryansg.com>2019-12-18 11:36:40 -0500
committerAustin Schaffer <austin.schaffer@ryansg.com>2019-12-18 11:36:40 -0500
commit5e5932fe9dd43c42ab3dec8d0fefe21b11d22ebb (patch)
treea2149f9f773c528c047fb707e6482eb30ea71e16 /test
parentd7f01e12c8ef0d3b4f4e9f6598ca65d2558750b1 (diff)
downloadliza-5e5932fe9dd43c42ab3dec8d0fefe21b11d22ebb.tar.gz
liza-5e5932fe9dd43c42ab3dec8d0fefe21b11d22ebb.tar.bz2
liza-5e5932fe9dd43c42ab3dec8d0fefe21b11d22ebb.zip
[DEV-5312] Get delta processor program field from mongodb
Diffstat (limited to 'test')
-rw-r--r--test/system/DeltaProcessorTest.ts7
-rw-r--r--test/system/V1MessageWriterTest.ts5
2 files changed, 11 insertions, 1 deletions
diff --git a/test/system/DeltaProcessorTest.ts b/test/system/DeltaProcessorTest.ts
index 1587bb2..84f955a 100644
--- a/test/system/DeltaProcessorTest.ts
+++ b/test/system/DeltaProcessorTest.ts
@@ -428,6 +428,7 @@ describe( 'system.DeltaProcessor', () =>
const createdData = <UnixTimestamp>234234234;
const doc = <DeltaDocument[]>[ {
id: <DocumentId>123,
+ programId: 'mega',
agentName: entity_num,
agentEntityId: entity_id,
startDate: createdData,
@@ -447,6 +448,7 @@ describe( 'system.DeltaProcessor', () =>
},
{
id: <DocumentId>234,
+ programId: 'mega',
agentName: entity_num,
agentEntityId: entity_id,
startDate: createdData,
@@ -471,6 +473,7 @@ describe( 'system.DeltaProcessor', () =>
entity_id: 4321,
entity_name: 'Some Agency',
id: 123,
+ program: 'mega',
lastUpdate: 123123123,
startDate: 234234234,
},
@@ -483,6 +486,7 @@ describe( 'system.DeltaProcessor', () =>
entity_id: 4321,
entity_name: 'Some Agency',
id: 234,
+ program: 'mega',
lastUpdate: 123123123,
startDate: 234234234,
},
@@ -548,6 +552,7 @@ describe( 'system.DeltaProcessor', () =>
const emitter = new EventEmitter();
const doc = <DeltaDocument[]>[ {
id: <DocumentId>123,
+ programId: 'mega',
agentName: 'Some Agency',
agentEntityId: 4321,
startDate: <UnixTimestamp>234234234,
@@ -567,6 +572,7 @@ describe( 'system.DeltaProcessor', () =>
},
{
id: <DocumentId>234,
+ programId: 'mega',
agentName: 'Some Agency',
agentEntityId: 4321,
startDate: <UnixTimestamp>234234234,
@@ -591,6 +597,7 @@ describe( 'system.DeltaProcessor', () =>
entity_id: 4321,
entity_name: 'Some Agency',
id: 123,
+ program: 'mega',
lastUpdate: 123123123,
startDate: 234234234,
},
diff --git a/test/system/V1MessageWriterTest.ts b/test/system/V1MessageWriterTest.ts
index 42bd302..a0931c0 100644
--- a/test/system/V1MessageWriterTest.ts
+++ b/test/system/V1MessageWriterTest.ts
@@ -372,11 +372,13 @@ describe( 'system.V1MessageWriter', () =>
} );
+
it( 'Message is formatted correctly', () =>
{
const bucket = { foo: [ 'bar', 'baz' ] };
const ratedata = {};
const doc_id = <DocumentId>123;
+ const program = 'mega';
const entity_name = 'Some Agency';
const entity_id = 123;
const startDate = <UnixTimestamp>345;
@@ -386,6 +388,7 @@ describe( 'system.V1MessageWriter', () =>
const encoder = createMockEncoderCtor( schema );
const meta = <DocumentMeta>{
id: doc_id,
+ program: program,
entity_name: entity_name,
entity_id: entity_id,
startDate: startDate,
@@ -442,7 +445,7 @@ describe( 'system.V1MessageWriter', () =>
},
program: {
Program: {
- id: 'quote_server',
+ id: program,
version: '',
},
},