fix unit tests

This commit is contained in:
Wells Bunker 2025-09-26 13:37:01 -06:00
parent d627d3f5a8
commit 72dda21434
No known key found for this signature in database
GPG Key ID: DB16D6F2679B78FC
2 changed files with 5 additions and 5 deletions

View File

@ -275,7 +275,7 @@ describe('getDashboardHandler', () => {
});
await expect(getDashboardHandler({ dashboardId: 'dashboard-123' }, mockUser)).rejects.toThrow(
new HTTPException(403, { message: 'Public access to this dashboard has expired' })
new HTTPException(403, { message: 'Public access has expired' })
);
});

View File

@ -308,7 +308,7 @@ describe('metric-helpers', () => {
const options: MetricAccessOptions = { publicAccessPreviouslyVerified: false };
await expect(fetchAndProcessMetricData('metric-123', mockUser, options)).rejects.toThrow(
new HTTPException(403, { message: "You don't have permission to view this metric" })
new HTTPException(403, { message: 'You do not have permission to access this asset' })
);
});
@ -345,7 +345,7 @@ describe('metric-helpers', () => {
const options: MetricAccessOptions = { publicAccessPreviouslyVerified: false };
await expect(fetchAndProcessMetricData('metric-123', mockUser, options)).rejects.toThrow(
new HTTPException(403, { message: "You don't have permission to view this metric" })
new HTTPException(403, { message: 'Public access has expired' })
);
});
@ -363,7 +363,7 @@ describe('metric-helpers', () => {
const options: MetricAccessOptions = { publicAccessPreviouslyVerified: false };
await expect(fetchAndProcessMetricData('metric-123', mockUser, options)).rejects.toThrow(
new HTTPException(403, { message: "You don't have permission to view this metric" })
new HTTPException(418, { message: 'Password required for public access' })
);
});
@ -384,7 +384,7 @@ describe('metric-helpers', () => {
};
await expect(fetchAndProcessMetricData('metric-123', mockUser, options)).rejects.toThrow(
new HTTPException(403, { message: "You don't have permission to view this metric" })
new HTTPException(403, { message: 'Incorrect password for public access' })
);
});