From 8007def6d1685d91b87c3a46d0e5195dab7fae17 Mon Sep 17 00:00:00 2001 From: gcarron <gcarron@grandlyon.com> Date: Tue, 27 Sep 2022 11:32:43 +0200 Subject: [PATCH] fix tests --- __tests__/helpers/env.spec.js | 10 +++++----- importedData.json | 26 +++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/__tests__/helpers/env.spec.js b/__tests__/helpers/env.spec.js index 9716150..a4885ed 100644 --- a/__tests__/helpers/env.spec.js +++ b/__tests__/helpers/env.spec.js @@ -1,4 +1,4 @@ -const { isAlpha } = require('../../src/helpers/env') +const { isDev } = require('../../src/helpers/env') describe('isAlpha', () => { const OLD_ENV = process.env @@ -14,19 +14,19 @@ describe('isAlpha', () => { it('should return false for local', () => { // Set the variables process.env.COZY_URL = 'http://cozy.tools:8080' - const reply = isAlpha() - expect(reply).toBe(false) + const reply = isDev() + expect(reply).toBe(true) }) it('should return false for prod URL', () => { // Set the variables process.env.COZY_URL = 'https://pouet-ecolyo.cozygrandlyon.cloud/' - const reply = isAlpha() + const reply = isDev() expect(reply).toBe(false) }) it('should return true for alpha', () => { // Set the variables process.env.COZY_URL = 'https://pouet.cozy.self-data.alpha.grandlyon.com/' - const reply = isAlpha() + const reply = isDev() expect(reply).toBe(true) }) }) diff --git a/importedData.json b/importedData.json index 5b3d3e9..f10553a 100644 --- a/importedData.json +++ b/importedData.json @@ -2,5 +2,29 @@ "io.cozy.files": [], "com.grandlyon.enedis.year": [], "com.grandlyon.enedis.month": [], - "com.grandlyon.enedis.minute": [] + "com.grandlyon.enedis.minute": [], + "io.cozy.accounts": [ + { + "cozyMetadata": { + "doctypeVersion": 1, + "metadataVersion": 1, + "createdAt": "2022-09-27T09:28:57.802Z", + "createdByApp": "enedis-sge-grandlyon", + "createdByAppVersion": "1.0.1", + "updatedAt": "2022-09-27T09:32:18.359Z", + "updatedByApps": [ + { + "slug": "enedis-sge-grandlyon", + "date": "2022-09-27T09:32:18.359Z", + "version": "1.0.1" + } + ] + }, + "_id": "1111111", + "account_type": "1111111", + "data": { + "name": "pouet" + } + } + ] } \ No newline at end of file -- GitLab