Skip to content

Commit

Permalink
Stubbing .get call to include form hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan Macdonald committed Nov 8, 2021
1 parent 272fd2a commit f1b4e1b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions webapp/tests/karma/ts/services/enketo.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,7 @@ describe('Enketo service', () => {

dbBulkDocs.callsFake(docs => Promise.resolve(docs.map(doc => ({ ok: true, id: doc._id, rev: '1' }))));
dbGetAttachment.resolves('<form/>');
dbGet.resolves({ form: 'V', form_version: {time: '1', sha256: 'imahash'}});
UserContact.resolves({ _id: '123', phone: '555' });
const geoHandle = sinon.stub().resolves({ geo: 'data' });
transitionsService.applyTransitions.callsFake((docs) => {
Expand All @@ -1441,6 +1442,7 @@ describe('Enketo service', () => {
fields: { name: 'Sally', lmp: '10' },
hidden_fields: [],
form: 'V',
form_version: {time: '1', sha256: 'imahash'},
from: '555',
geolocation: { geo: 'data' },
geolocation_log: [{ recording: { geo: 'data' } }],
Expand Down Expand Up @@ -1476,6 +1478,7 @@ describe('Enketo service', () => {
fields: { name: 'Sally', lmp: '10' },
hidden_fields: [],
form: 'V',
form_version: {time: '1', sha256: 'imahash'},
from: '555',
geolocation: { geo: 'data' },
geolocation_log: [{ recording: { geo: 'data' } }],
Expand Down

0 comments on commit f1b4e1b

Please sign in to comment.