Skip to content

Commit 3954a45

Browse files
test: [UIE-8528] - DBaaS: Backups unit test fix (linode#11660)
* fix: [UIE-8528] - DBaaS: Backups unit test fix * Added changeset: DBaaS: Backups unit test fix
1 parent e1db3d1 commit 3954a45

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Tests
3+
---
4+
5+
DBaaS: Backups unit test fix ([#11660](https://github.com/linode/manager/pull/11660))

packages/manager/src/features/Databases/utilities.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,13 @@ describe('toFormatedDate', () => {
390390
it('should handle newest full backup plus incremental option correctly in UTC', () => {
391391
const selectedDate = null;
392392
const today = DateTime.utc();
393-
const mockTodayWithHours = `${today.toISODate()} ${today.hour}:00`;
393+
const mockTodayWithHours = DateTime.fromObject({
394+
day: today.day,
395+
month: today.month,
396+
year: today.year,
397+
hour: today.hour,
398+
minute: 0,
399+
}).toFormat('yyyy-MM-dd HH:mm');
394400
const result = toFormatedDate(selectedDate, undefined);
395401
expect(result).toContain(mockTodayWithHours);
396402
});

0 commit comments

Comments
 (0)