Skip to content

Commit d8e8d5e

Browse files
committed
additional testing
1 parent 5c27f41 commit d8e8d5e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/api/shared/responses.test.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,18 @@ describe('API responses', () => {
159159
});
160160
});
161161

162-
it('Handles notAuthorized response', () => {
162+
it('Handles basic notAuthorized response', () => {
163+
const response = notAuthorized();
164+
expect(response).toEqual({
165+
headers: {
166+
'Access-Control-Allow-Origin': '*',
167+
'Access-Control-Allow-Credentials': true,
168+
},
169+
statusCode: 401,
170+
});
171+
});
172+
173+
it('Handles overridden notAuthorized response', () => {
163174
const response = notAuthorized({ body: 'not found' });
164175
expect(response).toEqual({
165176
body: JSON.stringify('not found'),

0 commit comments

Comments
 (0)