Created
July 12, 2017 02:46
-
-
Save khaosdoctor/3dc84f9599c6afcbaba1fd28f464d244 to your computer and use it in GitHub Desktop.
Failure Test for status API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Should return 503 when the api or the database are not ok', (assert) => { | |
assert.plan(1) | |
let dbMock = { // Cria um modelo do objeto do banco de dados apenas com as propriedades que a rota chama | |
connection: { | |
readyState: 0 | |
} | |
} | |
func(assert.context.routeContext, null, dbMock) | |
assert.deepEqual(assert.context.routeContext.status, 503) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment