Skip to content

Commit

Permalink
remove call to generate return logs on import
Browse files Browse the repository at this point in the history
  • Loading branch information
robertparkinson committed Jan 2, 2025
1 parent a16a9ad commit cf0e25a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
2 changes: 0 additions & 2 deletions app/services/jobs/import/process-import-licence.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

const DetermineLicenceEndDateChangedService = require('./determine-licence-end-date-changed.service.js')
const ProcessBillingFlagService = require('../../licences/supplementary/process-billing-flag.service.js')
const GenerateReturnLogsService = require('./generate-return-logs.service.js')

/**
* Process licence for the licences imported from NALD
Expand All @@ -32,7 +31,6 @@ async function go(licence) {

if (licenceEndDateChanged) {
ProcessBillingFlagService.go(payload)
GenerateReturnLogsService.go(licence.id, payload)
}
} catch (error) {
global.GlobalNotifier.omfg(`Importing licence ${licence.id}`, null, error)
Expand Down
13 changes: 0 additions & 13 deletions test/services/jobs/import/process-import-licence.service.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,6 @@ describe('Process Import Licence Service', () => {

expect(stubProcessBillingFlagService.calledWithExactly(expectedPayload)).to.be.true()
})

it('should call the "stubDetermineLicenceEndDateChangedService" service ', async () => {
await ProcessImportLicence.go(licence)

const expectedPayload = {
expiredDate: licence.expired_date,
lapsedDate: licence.lapsed_date,
revokedDate: licence.revoked_date,
licenceId: licence.id
}

expect(stubGenerateReturnLogsService.calledWithExactly(licence.id, expectedPayload)).to.be.true()
})
})
describe('and the licence end date has not changed', () => {
beforeEach(() => {
Expand Down

0 comments on commit cf0e25a

Please sign in to comment.