diff --git a/app/controllers/bill-runs.controller.js b/app/controllers/bill-runs.controller.js index 3dd5c40fca..a5319a63b5 100644 --- a/app/controllers/bill-runs.controller.js +++ b/app/controllers/bill-runs.controller.js @@ -16,6 +16,7 @@ const ReviewLicenceService = require('../services/bill-runs/two-part-tariff/revi const SendBillRunService = require('../services/bill-runs/send-bill-run.service.js') const StartBillRunProcessService = require('../services/bill-runs/start-bill-run-process.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') @@ -123,7 +124,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 ff9c102343..654eb6b58b 100644 --- a/test/controllers/bill-runs.controller.test.js +++ b/test/controllers/bill-runs.controller.test.js @@ -12,11 +12,12 @@ const { expect } = Code 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 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 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') const MatchDetailsService = require('../../app/services/bill-runs/two-part-tariff/match-details.service.js') @@ -371,7 +372,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 () => {