Reflect test with redirect returns noopApp

This commit is contained in:
Sebastien Chopin 2017-06-05 11:35:10 +02:00
parent 3a2b732965
commit c4613ce34b
1 changed files with 3 additions and 3 deletions

View File

@ -135,13 +135,13 @@ test('/error2 status code', async t => {
} }
}) })
test('/redirect2 status code', async t => { test('/redirect2', async t => {
stdMocks.use() stdMocks.use()
await rp(url('/redirect2')) // Should console.error await rp(url('/redirect2')) // Should console.error
stdMocks.restore() stdMocks.restore()
const output = stdMocks.flush() const output = stdMocks.flush()
t.true(output.stderr.length >= 1) // Don't display error since redirect returns a noopApp
t.true(output.stderr[0].includes('Error: NOPE!')) t.true(output.stderr.length === 0)
}) })
test('ETag Header', async t => { test('ETag Header', async t => {