mirror of https://github.com/buster-so/buster.git
fix unit tests
This commit is contained in:
parent
d627d3f5a8
commit
72dda21434
|
@ -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' })
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -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' })
|
||||
);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue