text: /* eslint-disable no-undef */
  
  const sinon = require('sinon');
  const { expect } = require('chai');
  const chai = require('chai');
  const sinonChai = require('sinon-chai');
  
  require('../../global.test');
  const CookieModel = require('../../../common/models/Cookie.class');
  const persontype = require('../../../common/seeddata/egar_type_of_saved_person');
  const documenttype = require('../../../common/seeddata/egar_saved_people_travel_document_type.json');
  const genderchoice = require('../../../common/seeddata/egar_gender_choice.json');
  
  const controller = require('../../../app/people/add/get.controller');
  
  describe('People Add Get Controller', () => {
    let req; let res;
  
    beforeEach(() => {
      chai.use(sinonChai);
  
      req = {
        session: {},
      };
      res = {
        render: sinon.spy(),
      };
    });
  
    afterEach(() => {
      sinon.restore();
    });
  
    it('should render the appropriate page', async () => {
      const cookie = new CookieModel(req);
  
      await controller(req, res);
  
      expect(res.render).to.have.been.calledWith('app/people/add/index', {
        cookie, genderchoice, persontype, documenttype,
      });
    });
  });
  