feat(app-config): persist relational virtual attrs

This commit is contained in:
Ali BARIN
2024-10-07 09:11:55 +00:00
committed by Faruk AYDIN
parent ecb04b4ba9
commit f5d796ea77
4 changed files with 94 additions and 21 deletions

View File

@@ -36,14 +36,6 @@ describe('AppConfig model', () => {
expect(AppConfig.virtualAttributes).toMatchSnapshot();
});
it('getApp should return associated application', async () => {
const appConfig = await createAppConfig({ key: 'deepl' });
const app = await appConfig.getApp();
expect(app.key).toBe('deepl');
});
describe('canCustomConnect', () => {
it('should return true when app is enabled and allows custom connection', async () => {
const appConfig = await createAppConfig({
@@ -112,4 +104,12 @@ describe('AppConfig model', () => {
expect(appConfig.canConnect).toBe(false);
});
});
it('getApp should return associated application', async () => {
const appConfig = await createAppConfig({ key: 'deepl' });
const app = await appConfig.getApp();
expect(app.key).toBe('deepl');
});
});