diff --git a/test/internal/modules/view-licences/controller.test.js b/test/internal/modules/view-licences/controller.test.js index 53d6dec05..f5f2ba373 100644 --- a/test/internal/modules/view-licences/controller.test.js +++ b/test/internal/modules/view-licences/controller.test.js @@ -27,8 +27,8 @@ experiment('internal/modules/billing/controllers/bills-tab', () => { response: sandbox.stub().returns(), redirect: sandbox.stub() } - sandbox.stub(services.water.licences, 'postMarkLicenceForSupplementaryBilling').resolves() sandbox.stub(services.system.licences, 'supplementary').resolves() + sandbox.stub(services.system.returns, 'supplementary').resolves() sandbox.stub(services.water.licences, 'getDocumentByLicenceId').resolves({ metadata: {}, system_external_id: 'test id' @@ -439,8 +439,8 @@ experiment('internal/modules/billing/controllers/bills-tab', () => { await controller.postMarkLicenceForSupplementaryBilling(request, h) }) - test('calls system', () => { - expect(services.system.licences.supplementary.calledWith(tempReturnId)).to.be.true() + test('calls system with the returnId', () => { + expect(services.system.returns.supplementary.calledWith(tempReturnId)).to.be.true() }) }) @@ -468,8 +468,8 @@ experiment('internal/modules/billing/controllers/bills-tab', () => { await controller.postMarkLicenceForSupplementaryBilling(request, h) }) - test('calls the backend', () => { - expect(services.water.licences.postMarkLicenceForSupplementaryBilling.calledWith(tempLicenceId)).to.be.true() + test('calls system with the licenceId', () => { + expect(services.system.licences.supplementary.calledWith(tempLicenceId)).to.be.true() }) test('returns the correct view data objects', async () => {