mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 17:12:43 +00:00
refactor: parameterize configureApp function (inject db list)
Reason: easier testing (mocking) and better readability Note: did additional refactoring
This commit is contained in:
committed by
Rainer Killinger
parent
f3b86f0f0d
commit
fe7dd09d7e
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
import {SCThingUpdateRoute} from '@openstapps/core';
|
||||
import chaiAsPromised from 'chai-as-promised';
|
||||
import {bulkStorage, DEFAULT_TEST_TIMEOUT} from '../common';
|
||||
import {bulkStorageMock, DEFAULT_TEST_TIMEOUT} from '../common';
|
||||
import {expect, use} from 'chai';
|
||||
import {instance as book} from '@openstapps/core/test/resources/Book.1.json';
|
||||
import {testApp} from '../tests-setup';
|
||||
@@ -38,6 +38,6 @@ describe('Thing update route', async function () {
|
||||
.send(book);
|
||||
|
||||
expect(status).to.equal(thingUpdateRoute.statusCodeSuccess);
|
||||
expect(bulkStorage.database.get(book.uid)).to.eventually.be.deep.equal(book);
|
||||
expect(bulkStorageMock.database.get(book.uid)).to.eventually.be.deep.equal(book);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user