mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Add test for fetching profile
This commit is contained in:
parent
e2e0774e7e
commit
a19c4f26c9
1 changed files with 19 additions and 0 deletions
|
|
@ -28,6 +28,13 @@ const articleSavingRequestQuery = ({
|
|||
articleSavingRequest {
|
||||
id
|
||||
status
|
||||
user {
|
||||
id
|
||||
profile {
|
||||
id
|
||||
username
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
... on ArticleSavingRequestError {
|
||||
|
|
@ -138,6 +145,18 @@ describe('ArticleSavingRequest API', () => {
|
|||
).to.eql(ArticleSavingRequestStatus.Processing)
|
||||
})
|
||||
|
||||
it('returns the user profile info', async () => {
|
||||
const res = await graphqlRequest(
|
||||
articleSavingRequestQuery({ url }),
|
||||
authToken
|
||||
).expect(200)
|
||||
|
||||
expect(
|
||||
res.body.data.articleSavingRequest.articleSavingRequest.user.profile
|
||||
.username
|
||||
).to.eql('fakeUser')
|
||||
})
|
||||
|
||||
it('returns the article saving request by id', async () => {
|
||||
const res = await graphqlRequest(
|
||||
articleSavingRequestQuery({ id }),
|
||||
|
|
|
|||
Loading…
Reference in a new issue