fix tests, move most errors to shared code

This commit is contained in:
Matteo Pagliazzi
2016-03-03 19:16:03 +01:00
parent 80f791c86b
commit 96c582e062
7 changed files with 37 additions and 59 deletions

View File

@@ -68,7 +68,7 @@ describe('POST /user/class/cast/:spellId', () => {
it('returns an error if user doesn\'t own the spell', async () => {
await expect(user.post(`/user/class/cast/snowball`))
.to.eventually.be.rejected.and.eql({
code: 400,
code: 401,
error: 'NotAuthorized',
message: t('spellNotOwned'),
});