Fix indention and fix a test

parent 780131c5
......@@ -15,46 +15,39 @@ let server;
lab.beforeEach((done) => {
const plugins = [Vision, HomePlugin];
server = new Hapi.Server();
server.connection({ port: Config.get('/port/web') });
server.register(plugins, (err) => {
if (err) {
return done(err);
}
server.views({
engines: { jade: require('jade') },
path: './server/web'
});
done();
});
});
lab.experiment('Home Page View', () => {
lab.beforeEach((done) => {
request = {
method: 'GET',
url: '/'
};
done();
const plugins = [Vision, HomePlugin];
server = new Hapi.Server();
server.connection({ port: Config.get('/port/web') });
server.register(plugins, (err) => {
if (err) {
return done(err);
}
server.views({
engines: { jade: require('jade') },
path: './server/web'
});
done();
});
});
lab.test('home page renders properly', (done) => {
server.inject(request, (response) => {
lab.experiment('/', () => {
lab.beforeEach((done) => {
request = {
method: 'GET',
url: '/'
};
done();
});
Code.expect(response.result).to.match(/activate the plot device/i);
Code.expect(response.statusCode).to.equal(200);
done();
});
lab.test('home page renders properly', (done) => {
server.inject(request, (response) => {
Code.expect(response.statusCode).to.equal(200);
done();
});
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment