mirror of
https://github.com/strapi/strapi.git
synced 2025-07-29 03:50:26 +00:00
test(logo-customization): updated tests
This commit is contained in:
parent
ba8cb27bb1
commit
c6cbf6b58d
@ -8,6 +8,7 @@ const {
|
|||||||
} = require('../project-settings');
|
} = require('../project-settings');
|
||||||
|
|
||||||
jest.mock('fs', () => ({
|
jest.mock('fs', () => ({
|
||||||
|
...jest.requireActual('fs'),
|
||||||
createReadStream: () => null,
|
createReadStream: () => null,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@ -230,7 +231,7 @@ describe('Project setting', () => {
|
|||||||
menuLogo: {
|
menuLogo: {
|
||||||
name: 'filename.png',
|
name: 'filename.png',
|
||||||
hash: 'filename_123',
|
hash: 'filename_123',
|
||||||
url: '/uploads/filename_123',
|
url: '/uploads/filename_123.png',
|
||||||
width: 100,
|
width: 100,
|
||||||
height: 100,
|
height: 100,
|
||||||
ext: '.png',
|
ext: '.png',
|
||||||
@ -238,7 +239,7 @@ describe('Project setting', () => {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
await updateProjectSettings({ body, files });
|
await updateProjectSettings({ ...body, ...files });
|
||||||
|
|
||||||
expect(storeSet).toBeCalledTimes(1);
|
expect(storeSet).toBeCalledTimes(1);
|
||||||
expect(storeSet).toBeCalledWith({
|
expect(storeSet).toBeCalledWith({
|
||||||
@ -255,7 +256,7 @@ describe('Project setting', () => {
|
|||||||
menuLogo: null,
|
menuLogo: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
await updateProjectSettings({ body, files });
|
await updateProjectSettings({ ...body, ...files });
|
||||||
|
|
||||||
expect(storeSet).toBeCalledTimes(1);
|
expect(storeSet).toBeCalledTimes(1);
|
||||||
expect(storeSet).toBeCalledWith({
|
expect(storeSet).toBeCalledWith({
|
||||||
@ -280,7 +281,7 @@ describe('Project setting', () => {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
await updateProjectSettings({ body, files });
|
await updateProjectSettings({ ...body, ...files });
|
||||||
|
|
||||||
expect(storeSet).toBeCalledTimes(1);
|
expect(storeSet).toBeCalledTimes(1);
|
||||||
expect(storeSet).toBeCalledWith({
|
expect(storeSet).toBeCalledWith({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user