diff --git a/app/controllers/bill-runs.controller.js b/app/controllers/bill-runs.controller.js index 7a4425a7f3..47494df1f5 100644 --- a/app/controllers/bill-runs.controller.js +++ b/app/controllers/bill-runs.controller.js @@ -18,6 +18,7 @@ const SendBillRunService = require('../services/bill-runs/send-bill-run.service. const StartBillRunProcessService = require('../services/bill-runs/start-bill-run-process.service.js') const SubmitAmendedBillableReturnsService = require('..//services/bill-runs/two-part-tariff/submit-amended-billable-returns.service.js') const SubmitCancelBillRunService = require('../services/bill-runs/submit-cancel-bill-run.service.js') +const SubmitReviewLicenceService = require('../services/bill-runs/two-part-tariff/submit-review-licence.service.js') const SubmitSendBillRunService = require('../services/bill-runs/submit-send-bill-run.service.js') const ViewBillRunService = require('../services/bill-runs/view-bill-run.service.js') @@ -149,7 +150,7 @@ async function submitCancel (request, h) { async function submitReviewLicence (request, h) { const { id: billRunId, licenceId } = request.params - const pageData = await ReviewLicenceService.go(billRunId, licenceId, request.payload) + const pageData = await SubmitReviewLicenceService.go(billRunId, licenceId, request.payload) return h.view('bill-runs/review-licence.njk', { pageTitle: `Licence ${pageData.licence.licenceRef}`, diff --git a/test/controllers/bill-runs.controller.test.js b/test/controllers/bill-runs.controller.test.js index e5d87d0efa..ad9e277a2c 100644 --- a/test/controllers/bill-runs.controller.test.js +++ b/test/controllers/bill-runs.controller.test.js @@ -14,12 +14,13 @@ const Boom = require('@hapi/boom') const CancelBillRunService = require('../../app/services/bill-runs/cancel-bill-run.service.js') const IndexBillRunsService = require('../../app/services/bill-runs/index-bill-runs.service.js') const MatchDetailsService = require('../../app/services/bill-runs/two-part-tariff/match-details.service.js') -const ReviewLicenceService = require('../../app/services/bill-runs/two-part-tariff/review-licence.service.js') const ReviewBillRunService = require('../../app/services/bill-runs/two-part-tariff/review-bill-run.service.js') +const ReviewLicenceService = require('../../app/services/bill-runs/two-part-tariff/review-licence.service.js') const SendBillRunService = require('../../app/services/bill-runs/send-bill-run.service.js') const StartBillRunProcessService = require('../../app/services/bill-runs/start-bill-run-process.service.js') const SubmitAmendedBillableReturnsService = require('../../app/services/bill-runs/two-part-tariff/submit-amended-billable-returns.service.js') const SubmitCancelBillRunService = require('../../app/services/bill-runs/submit-cancel-bill-run.service.js') +const SubmitReviewLicenceService = require('../../app/services/bill-runs/two-part-tariff/submit-review-licence.service.js') const SubmitSendBillRunService = require('../../app/services/bill-runs/submit-send-bill-run.service.js') const ViewBillRunService = require('../../app/services/bill-runs/view-bill-run.service.js') @@ -373,7 +374,7 @@ describe('Bill Runs controller', () => { describe('when a request is valid', () => { beforeEach(() => { - Sinon.stub(ReviewLicenceService, 'go').resolves(_licenceReviewData()) + Sinon.stub(SubmitReviewLicenceService, 'go').resolves(_licenceReviewData()) }) it('returns a 200 response', async () => {