From e341e50c0d44b756008150bae2f31c19d2eebf6a Mon Sep 17 00:00:00 2001
From: Pierre Ecarlat <pecarlat@grandlyon.com>
Date: Thu, 17 Oct 2024 17:08:53 +0200
Subject: [PATCH] Updated account format in mocks

---
 scripts/createConnections.js         | 17 +++++++++--------
 tests/__mocks__/accountsData.mock.ts |  8 ++++----
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/scripts/createConnections.js b/scripts/createConnections.js
index 80a42cca2..d8144f910 100644
--- a/scripts/createConnections.js
+++ b/scripts/createConnections.js
@@ -38,11 +38,13 @@ const dataGrdfAccount = JSON.stringify({
   id: GRDF_ACCOUNT_ID,
   account_type: 'grdfgrandlyon',
   auth: {
-    credentials_encrypted:
-      'bmFjbMKrNCS+4Liakxdu+xNu9I3sSyvda8iAp0o3U3OAymbIeoLhLtxPdsa+3mu/8yTnDudBcJo=',
-    login: 'test',
+    pce: '12345678901234',
+    email: 'jane@grandlyon.com',
+    lastname: 'Doe',
+    firstname: 'Jane',
+    postalCode: '69003',
   },
-  identifier: 'login',
+  identifier: 'email',
   state: null,
 })
 
@@ -51,11 +53,10 @@ const dataEglAccount = JSON.stringify({
   id: EGL_ACCOUNT_ID,
   account_type: 'eglgrandlyon',
   auth: {
-    credentials_encrypted:
-      'bmFjbHI5OoL+VNCT6JDFYea1dNiBGGNJM1zY0M4uWcjhALJcQT9uk9p9WPD7+1OryCAoYf9eaSE=',
-    login: 'test',
+    contractId: '1234567',
+    meteringId: '123456789ABC',
   },
-  identifier: 'login',
+  identifier: 'contractId',
   state: null,
 })
 
diff --git a/tests/__mocks__/accountsData.mock.ts b/tests/__mocks__/accountsData.mock.ts
index 911835bf0..c7a02d041 100644
--- a/tests/__mocks__/accountsData.mock.ts
+++ b/tests/__mocks__/accountsData.mock.ts
@@ -25,17 +25,17 @@ export const accountsData: Account[] = [
       expirationDate: '2023-09-26',
       offPeakHours: '22H00-6H00',
     },
+    identifier: 'address',
   },
   {
     _id: '90e68b8450cee09fe2f077610901094d',
     id: '90e68b8450cee09fe2f077610901094d',
     account_type: 'eglgrandlyon',
     auth: {
-      credentials_encrypted:
-        'bmFjbHI5OoL+VNCT6JDFYea1dNiBGGNJM1zY0M4uWcjhALJcQT9uk9p9WPD7+1OryCAoYf9eaSE=',
-      login: 'test',
+      contractId: '1234567',
+      meteringId: '123456789ABC',
     },
-    identifier: 'login',
+    identifier: 'contractId',
     state: null,
     _rev: '1-90e68b8450cee09fe2f077610901094d',
     _type: 'io.cozy.accounts',
-- 
GitLab