mirror of
https://github.com/strapi/strapi.git
synced 2025-12-26 06:35:47 +00:00
use lodash/fp
This commit is contained in:
parent
574448deae
commit
6577a9533c
@ -2,7 +2,7 @@
|
||||
|
||||
const { ApplicationError } = require('@strapi/utils').errors;
|
||||
const { YupValidationError } = require('@strapi/utils/lib/errors');
|
||||
const { omit } = require('lodash');
|
||||
const { omit } = require('lodash/fp');
|
||||
const createContext = require('../../../../../../test/helpers/create-context');
|
||||
const apiTokenController = require('../api-token');
|
||||
|
||||
@ -165,7 +165,7 @@ describe('API Token Controller', () => {
|
||||
|
||||
expect(exists).toHaveBeenCalledWith({ name: tokenBody.name });
|
||||
expect(badRequest).not.toHaveBeenCalled();
|
||||
expect(create).toHaveBeenCalledWith(omit(createBody, 'expiresAt'));
|
||||
expect(create).toHaveBeenCalledWith(omit(['expiresAt'], createBody));
|
||||
expect(created).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user