mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Expose bug in Query { isLoggedin }
The idMiddleware was adding selection fields to the resolveInfo even if
the selection fields were empty. This caused a bug for each resolve
function including
```
{
isLoggedin
}
```
which does not have any additional curly braces after the query.
This commit is contained in:
parent
a1e5e866d1
commit
889818cd2d
@ -16,6 +16,15 @@ afterEach(async () => {
|
||||
await factory.cleanDatabase()
|
||||
})
|
||||
|
||||
describe('isLoggedIn', () => {
|
||||
describe('unauthenticated', () => {
|
||||
it('returns false', async () => {
|
||||
const query = '{ isLoggedIn }'
|
||||
await expect(request(host, query)).resolves.toEqual({ isLoggedIn: false })
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('login', () => {
|
||||
const mutation = (params) => {
|
||||
const { email, password } = params
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user