浏览代码

feat(update app): fix tests

cchalopin 1 年之前
父节点
当前提交
1357efa0e3
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/server/services/apps/apps.service.test.ts

+ 2 - 2
src/server/services/apps/apps.service.test.ts

@@ -477,7 +477,7 @@ describe('Update app', () => {
   it('Should correctly update app', async () => {
   it('Should correctly update app', async () => {
     // arrange
     // arrange
     const appConfig = createAppConfig({});
     const appConfig = createAppConfig({});
-    await insertApp({ version: 12, config: { TEST_FIELD: 'test' } }, appConfig, db);
+    await insertApp({ version: 12, status: 'running', config: { TEST_FIELD: 'test' } }, appConfig, db);
 
 
     // act
     // act
     await updateApp(appConfig.id, { version: 0 }, db);
     await updateApp(appConfig.id, { version: 0 }, db);
@@ -487,7 +487,7 @@ describe('Update app', () => {
     expect(app).toBeDefined();
     expect(app).toBeDefined();
     expect(app?.config).toStrictEqual({ TEST_FIELD: 'test' });
     expect(app?.config).toStrictEqual({ TEST_FIELD: 'test' });
     expect(app?.version).toBe(appConfig.tipi_version);
     expect(app?.version).toBe(appConfig.tipi_version);
-    expect(app?.status).toBe('stopped');
+    expect(app?.status).toBe('running');
   });
   });
 
 
   it("Should throw if app doesn't exist", async () => {
   it("Should throw if app doesn't exist", async () => {