From c814686670b4d6efdaa2077484bb3bc0d5a4037b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Poizat?= Date: Thu, 7 Nov 2024 10:32:00 +0100 Subject: [PATCH] test: Remove test about a flag which does not exist anymore --- src/modules/filelist/AddFolder.spec.jsx | 39 +++++++------------------ 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/src/modules/filelist/AddFolder.spec.jsx b/src/modules/filelist/AddFolder.spec.jsx index 54388cad5d..0ab479eff4 100644 --- a/src/modules/filelist/AddFolder.spec.jsx +++ b/src/modules/filelist/AddFolder.spec.jsx @@ -1,7 +1,6 @@ import { mount } from 'enzyme' import React from 'react' -import flag from 'cozy-flags' import { WebVaultClient } from 'cozy-keys-lib' import AddFolder, { AddFolder as DumbAddFolder } from './AddFolder' @@ -9,8 +8,6 @@ import { createFolder } from 'modules/navigation/duck/actions' import AppLike from 'test/components/AppLike' import { setupStoreAndClient } from 'test/setup' -const originalFlag = jest.requireActual('cozy-flags').default - jest.mock('modules/navigation/duck/actions', () => ({ createFolder: jest.fn(() => async () => {}) })) @@ -41,31 +38,15 @@ describe('AddFolder', () => { return { root, client, component, vaultClient } } - describe('cozy-client migration', () => { - beforeEach(() => { - flag.mockImplementation(function (name) { - if (name === 'drive.client-migration.enabled') { - return true - } else { - return originalFlag.apply(this, arguments) - } - }) - }) - - afterEach(() => { - flag.mockReset() - }) - - it('should dispatch a createFolder action on submit', () => { - const { component, client, vaultClient } = setup() - expect(component.props().onSubmit('Mes photos de chat')) - expect(createFolder).toHaveBeenCalledWith( - client, - vaultClient, - 'Mes photos de chat', - CURRENT_FOLDER_ID, - { isEncryptedFolder: false } - ) - }) + it('should dispatch a createFolder action on submit', () => { + const { component, client, vaultClient } = setup() + expect(component.props().onSubmit('Mes photos de chat')) + expect(createFolder).toHaveBeenCalledWith( + client, + vaultClient, + 'Mes photos de chat', + CURRENT_FOLDER_ID, + { isEncryptedFolder: false } + ) }) })