test(rebase): adjust tests from rebase and glue them together

This commit is contained in:
Benedikt Rötsch
2017-11-06 12:35:14 +01:00
committed by Benedikt Rötsch
parent 1e271656de
commit f2f2a79670
3 changed files with 18 additions and 20 deletions

View File

@@ -9,6 +9,12 @@ const contentful = require('../../services/contentful')
const request = {}
const response = {
locals: {
settings: {
space: 'spaceId',
cda: 'cda',
cpa: 'cpa',
editorialFeatures: false
},
currentLocale: {
code: 'en-US'
},
@@ -76,14 +82,6 @@ describe('Lessons', () => {
describe('Settings', () => {
test('It should render settings', async () => {
response.locals = {
settings: {
space: 'spaceId',
cda: 'cda',
cpa: 'cpa',
editorialFeatures: false
}
}
await getSettings(request, response)
expect(response.render.mock.calls[0][0]).toBe('settings')
expect(response.render.mock.calls[0][1].title).toBe('Settings')