mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 10:23:34 +00:00
fix date unit test
This commit is contained in:
parent
03a6b33131
commit
ca708d3f4d
@ -92,20 +92,17 @@ describe('Test type date', () => {
|
||||
});
|
||||
|
||||
test('Updating entry sets the right value and format JSON', async () => {
|
||||
const now = new Date(2018, 7, 5);
|
||||
|
||||
const res = await rq.post('/content-manager/collection-types/api::withdate.withdate', {
|
||||
body: {
|
||||
field: now,
|
||||
field: '2018-06-05',
|
||||
},
|
||||
});
|
||||
|
||||
const newDate = new Date(2017, 10, 23);
|
||||
const updateRes = await rq.put(
|
||||
`/content-manager/collection-types/api::withdate.withdate/${res.body.id}`,
|
||||
{
|
||||
body: {
|
||||
field: newDate,
|
||||
field: '2017-11-23',
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user