Skip to content

Commit

Permalink
Fix tests after 53bf19f
Browse files Browse the repository at this point in the history
  • Loading branch information
tnajdek committed Nov 25, 2024
1 parent c71652d commit 77df0a2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/groups.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,23 @@ describe('Group libraries', () => {
throw new Error('Unexpected request');
}),
http.get('https://api.zotero.org/users/1/items/VR82JUX8/children', async () => {
// This is the parent item, this request is for the children of that item, we return the two attachments
return HttpResponse.json(testUserChildren, {
headers: { 'Total-Results': '2' },
});
}),
http.get('https://api.zotero.org/users/1/items/MWVZPK6B/children', async () => {
// This is the first attachment, this request is for the annotations for that attachment
return HttpResponse.json([], {
headers: { 'Total-Results': '0' },
})
}),
http.get('https://api.zotero.org/users/1/items/VG79HDDM/file', async () => {
// this is the second attachment, this request is for the annotations for that attachment
return HttpResponse.json([], {
headers: { 'Total-Results': '0' },
})
}),
http.post('https://api.zotero.org/groups/5119976/items/ERER8Z7M/file', async ({request}) => {
fileUploadRequests++;
expect(await request.text()).toEqual('md5=39bf1f4635fb0a4b2b9de876ed865f89&filename=Kealy et al. - 2002 - Effects of diet restriction on life span and age-r.pdf&filesize=248058&mtime=1673607166000');
Expand Down

0 comments on commit 77df0a2

Please sign in to comment.