mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
server returns 422 on incorrect language
GitOrigin-RevId: cce8d0274476aed2b48a6908df3a44a7ea9ff186
This commit is contained in:
parent
5835e9dc25
commit
111453c075
2 changed files with 3 additions and 3 deletions
|
@ -13,7 +13,7 @@ module.exports = {
|
|||
const { language } = req.body
|
||||
if (language && !languageCodeIsSupported(language)) {
|
||||
logger.info({ language }, `language not supported`)
|
||||
return res.status(200).send(JSON.stringify({ misspellings: [] }))
|
||||
return res.status(422).send(JSON.stringify({ misspellings: [] }))
|
||||
}
|
||||
|
||||
const userId = AuthenticationController.getLoggedInUserId(req)
|
||||
|
|
|
@ -110,8 +110,8 @@ describe('SpellingController', function() {
|
|||
.should.equal(true)
|
||||
})
|
||||
|
||||
it('should return a 200 status', function() {
|
||||
this.res.status.calledWith(200).should.equal(true)
|
||||
it('should return a 422 status', function() {
|
||||
this.res.status.calledWith(422).should.equal(true)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue