const test = require('tape');
const server = require('../src/server');

test('Check the index route', t => {
  const options = {
    method: 'GET',
    url: '/'
  };
  server.inject(options, response => {
    t.equal(response.statusCode, 200, 'You received a 200 status code');
    t.end();
  });
});

test('Check /index.js', t => {
  const options = {
    method: 'GET',
    url: '/index.js'
  };
  server.inject(options, response => {
    t.equal(response.statusCode, 200, 'You received a 200 status code');
    t.end();
  });
});

test('Check /public/jquery.min.js', t => {
  const options = {
    method: 'GET',
    url: '/public/jquery.min.js'
  };
  server.inject(options, response => {
    t.equal(response.statusCode, 200, 'You received a 200 status code');
    t.end();
  });
});

test('Check /public/materialize/css/materialize.min.css', t => {
  const options = {
    method: 'GET',
    url: '/public/materialize/css/materialize.min.css'
  };
  server.inject(options, response => {
    t.equal(response.statusCode, 200, 'You received a 200 status code');
    t.end();
  });
});

test('Check /public/materialize/js/materialize.min.jss', t => {
  const options = {
    method: 'GET',
    url: '/public/materialize/js/materialize.min.js'
  };
  server.inject(options, response => {
    t.equal(response.statusCode, 200, 'You received a 200 status code');
    t.end();
  });
});

test('Check /introduction', t => {
  const options = {
    method: 'GET',
    url: '/introduction'
  };
  server.inject(options, response => {
    t.equal(response.statusCode, 200, 'You received a 200 status code');
    t.end();
  });
});

test('Check /avatar', t => {
  const options = {
    method: 'GET',
    url: '/avatar'
  };
  server.inject(options, response => {
    t.equal(response.statusCode, 200, 'You received a 200 status code');
    t.end();
  });
});

test('Check /eating', t => {
  const options = {
    method: 'GET',
    url: '/eating'
  };
  server.inject(options, response => {
    t.equal(response.statusCode, 200, 'You received a 200 status code');
    t.end();
  });
});

test('Check /personality', t => {
  const options = {
    method: 'GET',
    url: '/personality'
  };
  server.inject(options, response => {
    t.equal(response.statusCode, 200, 'You received a 200 status code');
    t.end();
  });
});

test('Check /feelings', t => {
  const options = {
    method: 'GET',
    url: '/feelings'
  };
  server.inject(options, response => {
    t.equal(response.statusCode, 200, 'You received a 200 status code');
    t.end();
  });
});

test('Check /finished', t => {
  const options = {
    method: 'GET',
    url: '/finished'
  };
  server.inject(options, response => {
    t.equal(response.statusCode, 200, 'You received a 200 status code');
    t.end();
  });
});

@@ -2538,32 +2538,262 @@
 d();%0A  %7D);%0A%7D);%0A%0A
+test('Check /hobbies', t =%3E %7B%0A  const options = %7B%0A    method: 'GET',%0A    url: '/hobbies'%0A  %7D;%0A  server.inject(options, response =%3E %7B%0A    t.equal(response.statusCode, 200, 'You received a 200 status code');%0A    t.end();%0A  %7D);%0A%7D);%0A%0A
 test('Check /fin

Add test for hobbies route