Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const Organization = (data = {}) => {
throw new Error('Config must be provided');
}

self.state.config = Config.toDynamoItem(config);
self.state.config = Config(config);
self.touch();

return self;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import { expect } from 'chai';
import { createOrganization } from '../../../src/models/organization.js';
import { sleep } from '../util.js';
import { Config } from '../../../src/models/site/config.js';

const validData = {
id: '1111111',
Expand Down Expand Up @@ -87,7 +86,7 @@ describe('Organization Model Tests', () => {
});

it('updates config correctly', () => {
const conf = Config({
const conf = {
slack: {
workspace: 'workspace',
channel: 'channel',
Expand All @@ -98,7 +97,7 @@ describe('Organization Model Tests', () => {
mentions: [{ slack: ['slackId'] }],
}],
audits: {},
});
};
organization.updateConfig(conf);
const updatedConf = organization.getConfig();
expect(updatedConf.slack).to.be.an('object');
Expand Down Expand Up @@ -145,7 +144,7 @@ describe('Organization Model Tests', () => {

await sleep(20);

organization.updateConfig(Config({}));
organization.updateConfig({});

expect(organization.getUpdatedAt()).to.not.equal(initialUpdatedAt);
});
Expand Down