Skip to content

Instantly share code, notes, and snippets.

@starsinmypockets
Created July 3, 2019 12:24
Show Gist options
  • Save starsinmypockets/2540e916351d954feeb15e8bf900afd2 to your computer and use it in GitHub Desktop.
Save starsinmypockets/2540e916351d954feeb15e8bf900afd2 to your computer and use it in GitHub Desktop.
test('Theme defined route returns 404 when not enabled in config', async t => {
t.plan(2)
config.set('CKAN_THEME_ROUTES', '')
const res = await request(app)
.get('/foo')
t.is(config.get('CKAN_THEME_ROUTES'), '')
t.is(res.statusCode, 404)
})
/* Test output
routes › index › Theme defined route returns 404 when not enabled in config
/home/pj/Datopian/repos/frontend-v2/tests/routes/index.test.js:31
30:
31: t.is(config.get('CKAN_THEME…
32: t.is(res.statusCode, 404)
Difference:
- 'example'
+ ''
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment