Taichi Masuyama 3 سال پیش
والد
کامیت
9f719372d7
1فایلهای تغییر یافته به همراه32 افزوده شده و 0 حذف شده
  1. 32 0
      packages/app/test/integration/service/questionnaire-cron.test.ts

+ 32 - 0
packages/app/test/integration/service/questionnaire-cron.test.ts

@@ -27,6 +27,10 @@ describe('QuestionnaireCronService', () => {
         // saved in db、not finished (user types is updated from the time it was saved)
         // saved in db、not finished (user types is updated from the time it was saved)
         {
         {
           _id: '63a8354837e7aa378e16f0b1',
           _id: '63a8354837e7aa378e16f0b1',
+          title: {
+            ja_JP: 'GROWI に関するアンケート',
+            en_US: 'Questions about GROWI',
+          },
           showFrom: '2022-12-11',
           showFrom: '2022-12-11',
           showUntil: '2100-12-12',
           showUntil: '2100-12-12',
           questions: [
           questions: [
@@ -54,6 +58,10 @@ describe('QuestionnaireCronService', () => {
         // not saved, not finished
         // not saved, not finished
         {
         {
           _id: '63a8354837e7aa378e16f0b2',
           _id: '63a8354837e7aa378e16f0b2',
+          title: {
+            ja_JP: 'GROWI に関するアンケート',
+            en_US: 'Questions about GROWI',
+          },
           showFrom: '2021-12-11',
           showFrom: '2021-12-11',
           showUntil: '2100-12-12',
           showUntil: '2100-12-12',
           questions: [
           questions: [
@@ -81,6 +89,10 @@ describe('QuestionnaireCronService', () => {
         // not saved, finished
         // not saved, finished
         {
         {
           _id: '63a8354837e7aa378e16f0b3',
           _id: '63a8354837e7aa378e16f0b3',
+          title: {
+            ja_JP: 'GROWI に関するアンケート',
+            en_US: 'Questions about GROWI',
+          },
           showFrom: '2021-12-11',
           showFrom: '2021-12-11',
           showUntil: '2021-12-12',
           showUntil: '2021-12-12',
           questions: [
           questions: [
@@ -123,6 +135,10 @@ describe('QuestionnaireCronService', () => {
     await QuestionnaireOrder.insertMany([
     await QuestionnaireOrder.insertMany([
       {
       {
         _id: '63a8354837e7aa378e16f0b1',
         _id: '63a8354837e7aa378e16f0b1',
+        title: {
+          ja_JP: 'GROWI に関するアンケート',
+          en_US: 'Questions about GROWI',
+        },
         showFrom: '2022-12-11',
         showFrom: '2022-12-11',
         showUntil: '2100-12-12',
         showUntil: '2100-12-12',
         questions: [
         questions: [
@@ -147,6 +163,10 @@ describe('QuestionnaireCronService', () => {
       // finished
       // finished
       {
       {
         _id: '63a8354837e7aa378e16f0b4',
         _id: '63a8354837e7aa378e16f0b4',
+        title: {
+          ja_JP: 'GROWI に関するアンケート',
+          en_US: 'Questions about GROWI',
+        },
         showFrom: '2020-12-11',
         showFrom: '2020-12-11',
         showUntil: '2021-12-12',
         showUntil: '2021-12-12',
         questions: [
         questions: [
@@ -171,6 +191,10 @@ describe('QuestionnaireCronService', () => {
       // questionnaire that doesn't exist in questionnaire server
       // questionnaire that doesn't exist in questionnaire server
       {
       {
         _id: '63a8354837e7aa378e16f0b5',
         _id: '63a8354837e7aa378e16f0b5',
+        title: {
+          ja_JP: 'GROWI に関するアンケート',
+          en_US: 'Questions about GROWI',
+        },
         showFrom: '2020-12-11',
         showFrom: '2020-12-11',
         showUntil: '2100-12-12',
         showUntil: '2100-12-12',
         questions: [
         questions: [
@@ -228,6 +252,10 @@ describe('QuestionnaireCronService', () => {
     expect(JSON.parse(JSON.stringify(savedOrders))).toEqual([
     expect(JSON.parse(JSON.stringify(savedOrders))).toEqual([
       {
       {
         _id: '63a8354837e7aa378e16f0b1',
         _id: '63a8354837e7aa378e16f0b1',
+        title: {
+          ja_JP: 'GROWI に関するアンケート',
+          en_US: 'Questions about GROWI',
+        },
         showFrom: '2022-12-11T00:00:00.000Z',
         showFrom: '2022-12-11T00:00:00.000Z',
         showUntil: '2100-12-12T00:00:00.000Z',
         showUntil: '2100-12-12T00:00:00.000Z',
         questions: [
         questions: [
@@ -254,6 +282,10 @@ describe('QuestionnaireCronService', () => {
       },
       },
       {
       {
         _id: '63a8354837e7aa378e16f0b2',
         _id: '63a8354837e7aa378e16f0b2',
+        title: {
+          ja_JP: 'GROWI に関するアンケート',
+          en_US: 'Questions about GROWI',
+        },
         showFrom: '2021-12-11T00:00:00.000Z',
         showFrom: '2021-12-11T00:00:00.000Z',
         showUntil: '2100-12-12T00:00:00.000Z',
         showUntil: '2100-12-12T00:00:00.000Z',
         questions: [
         questions: [