mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix tests
This commit is contained in:
parent
d633b8c1c3
commit
62ecbccd34
1 changed files with 9 additions and 11 deletions
|
|
@ -27,6 +27,7 @@ import { getRepository } from '../../src/repository'
|
|||
import { createGroup, deleteGroup } from '../../src/services/groups'
|
||||
import { createLabel, deleteLabels } from '../../src/services/labels'
|
||||
import {
|
||||
countLibraryItems,
|
||||
createLibraryItems,
|
||||
createOrUpdateLibraryItem,
|
||||
CreateOrUpdateLibraryItemArgs,
|
||||
|
|
@ -2451,19 +2452,16 @@ describe('Article API', () => {
|
|||
})
|
||||
|
||||
it('empties the trash', async () => {
|
||||
let response = await graphqlRequest(
|
||||
searchQuery('in:trash'),
|
||||
authToken
|
||||
).expect(200)
|
||||
expect(response.body.data.search.pageInfo.totalCount).to.eql(5)
|
||||
|
||||
await graphqlRequest(emptyTrashQuery(), authToken).expect(200)
|
||||
|
||||
response = await graphqlRequest(
|
||||
searchQuery('in:trash'),
|
||||
authToken
|
||||
).expect(200)
|
||||
expect(response.body.data.search.pageInfo.totalCount).to.eql(0)
|
||||
const count = await countLibraryItems(
|
||||
{
|
||||
query: 'in:trash',
|
||||
includeDeleted: true,
|
||||
},
|
||||
user.id
|
||||
)
|
||||
expect(count).to.eql(0)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue