mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Properly test 106
I had the wrong test setup for the "expected-to-be-green" side tests (for debugging).
This commit is contained in:
parent
d50015af3c
commit
cd3f0955f9
@ -32,7 +32,12 @@ describe('authorization', () => {
|
||||
|
||||
describe('not logged in', async () => {
|
||||
it('does not expose the owner\'s email address', async () => {
|
||||
expect(await action(headers)).toEqual({ User: [ { email: null } ] })
|
||||
try {
|
||||
await action(headers)
|
||||
} catch (error) {
|
||||
expect(error.response.errors[0].message).toEqual('Not Authorised!')
|
||||
expect(error.response.data).toEqual({ User: [ { email: null } ] })
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@ -52,7 +57,12 @@ describe('authorization', () => {
|
||||
email: 'someone@example.org',
|
||||
password: 'else'
|
||||
})
|
||||
expect(await action(headers)).toEqual({ User: [ { email: null } ] })
|
||||
try {
|
||||
await action(headers)
|
||||
} catch (error) {
|
||||
expect(error.response.errors[0].message).toEqual('Not Authorised!')
|
||||
expect(error.response.data).toEqual({ User: [ { email: null } ] })
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user