File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/services/confirmation-statement
test/services/confirmation-statement Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -200,8 +200,8 @@ export default class {
200200 return resource ;
201201 }
202202
203- public async getShareholders ( companyNumber : string ) : Promise < Resource < Shareholder [ ] > | ApiErrorResponse > {
204- const url = `${ this . getConfirmationStatementUrl ( companyNumber ) } /shareholders` ;
203+ public async getShareholders ( transactionId : string , confirmationStatementId : string ) : Promise < Resource < Shareholder [ ] > | ApiErrorResponse > {
204+ const url = `${ this . getConfirmationStatementUrlIncTransactionId ( transactionId ) } / ${ confirmationStatementId } /shareholders` ;
205205 const resp : HttpResponse = await this . client . httpGet ( url ) ;
206206
207207 if ( resp . status >= 400 ) {
Original file line number Diff line number Diff line change @@ -303,7 +303,7 @@ describe("Shareholder GET", () => {
303303 it ( "should return a list of shareholder" , async ( ) => {
304304 sinon . stub ( mockValues . requestClient , "httpGet" ) . resolves ( mockGetShareholder [ 200 ] ) ;
305305 const csService : ConfirmationStatementService = new ConfirmationStatementService ( mockValues . requestClient ) ;
306- const data : Resource < Shareholder [ ] > = await csService . getShareholders ( COMPANY_NUMBER ) as Resource < Shareholder [ ] > ;
306+ const data : Resource < Shareholder [ ] > = await csService . getShareholders ( TRANSACTION_ID , CONFIRMATION_STATEMENT_ID ) as Resource < Shareholder [ ] > ;
307307 expect ( data . httpStatusCode ) . to . equal ( 200 ) ;
308308 expect ( data . resource [ 0 ] . surname ) . to . equal ( "Lewis" ) ;
309309 expect ( data . resource [ 0 ] . foreName2 ) . to . undefined ;
@@ -313,7 +313,7 @@ describe("Shareholder GET", () => {
313313 it ( "should return a 500 error - Internal server error" , async ( ) => {
314314 sinon . stub ( mockValues . requestClient , "httpGet" ) . resolves ( mockGetShareholder [ 500 ] ) ;
315315 const csService : ConfirmationStatementService = new ConfirmationStatementService ( mockValues . requestClient ) ;
316- const data : ApiErrorResponse = await csService . getShareholders ( COMPANY_NUMBER ) as ApiErrorResponse ;
316+ const data : ApiErrorResponse = await csService . getShareholders ( TRANSACTION_ID , CONFIRMATION_STATEMENT_ID ) as ApiErrorResponse ;
317317 expect ( data . httpStatusCode ) . to . equal ( 500 ) ;
318318 expect ( data . errors [ 0 ] ) . to . equal ( "Internal server error" ) ;
319319 } ) ;
You can’t perform that action at this time.
0 commit comments