<commit_before>var expect = require('chai').expect
var moment = require('moment')
var databaseHelper = require('../../../helpers/database-setup-for-tests')

var claim = require('../../../../app/services/data/get-individual-claim-details')
var reference = 'V123456'
var DATE
var claimId
var eligibilityId
var prisonerId
var visitorId

describe('services/data/get-individual-claim-details', function () {
  describe('get', function (done) {
    before(function (done) {
      DATE = moment().toDate()
      databaseHelper.setup(reference, DATE).then(function (ids) {
        claimId = ids.claimId
        eligibilityId = ids.eligibilityId
        prisonerId = ids.prisonerId
        visitorId = ids.visitorId
        done()
      })
    })

    it('should return a visitors details to do with claim', function (done) {
      claim.get(claimId)
        .then(function (result) {
          expect(result.Reference).to.equal(reference)
          expect(result.FirstName).to.equal('John')
          expect(result.LastName).to.equal('Smith')
          expect(result.DateSubmitted.toString()).to.equal(DATE.toString())
          expect(result.DateOfBirth.toString()).to.equal(DATE.toString())
          expect(result.NationalInsuranceNumber).to.equal('QQ123456c')
          expect(result.HouseNumberAndStreet).to.equal('1 Test Road')<commit_msg>Fixed integration test from merging<commit_after>var expect = require('chai').expect
var moment = require('moment')
var databaseHelper = require('../../../helpers/database-setup-for-tests')

var claim = require('../../../../app/services/data/get-individual-claim-details')
var reference = 'V123456'
var DATE
var claimId
var eligibilityId
var prisonerId
var visitorId

describe('services/data/get-individual-claim-details', function () {
  describe('get', function (done) {
    before(function (done) {
      DATE = moment().toDate()
      databaseHelper.setup(reference, DATE, 'TEST').then(function (ids) {
        claimId = ids.claimId
        eligibilityId = ids.eligibilityId
        prisonerId = ids.prisonerId
        visitorId = ids.visitorId
        done()
      })
    })

    it('should return a visitors details to do with claim', function (done) {
      claim.get(claimId)
        .then(function (result) {
          expect(result.Reference).to.equal(reference)
          expect(result.FirstName).to.equal('John')
          expect(result.LastName).to.equal('Smith')
          expect(result.DateSubmitted.toString()).to.equal(DATE.toString())
          expect(result.DateOfBirth.toString()).to.equal(DATE.toString())
          expect(result.NationalInsuranceNumber).to.equal('QQ123456c')
          expect(result.HouseNumberAndStreet).to.equal('1 Test Road')
{'fraction_non_alphanumeric': 0.14460059171597633, 'fraction_numerical': 0.009615384615384616, 'mean_word_length': 3.2265625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4154406', 'n_tokens_mistral': 807, 'n_tokens_neox': 757, 'n_words': 142}