Skip to content

Commit 52bc4b1

Browse files
authored
Merge pull request #848 from companieshouse/feature/ROECCT-780-modify-entries-returned-for-psc
modify: amount of PSC's returned (ONLY FOR TESTING)
2 parents 4071d4d + 5b08711 commit 52bc4b1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/services/company-psc/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default class CompanyPscService {
1414
*
1515
* @param number the company number to look up
1616
*/
17-
public async getCompanyPsc (number: string, startIndex: number = 0, itemsPerPage: number = 25, headers?: Headers): Promise<Resource<CompanyPersonsWithSignificantControl>> {
17+
public async getCompanyPsc (number: string, startIndex: number = 0, itemsPerPage: number = 30, headers?: Headers): Promise<Resource<CompanyPersonsWithSignificantControl>> {
1818
const resp = await this.client.httpGet(`/company/${number}/persons-with-significant-control?start_index=${startIndex}&items_per_page=${itemsPerPage}`, headers);
1919

2020
const resource: Resource<CompanyPersonsWithSignificantControl> = {

test/services/company-psc/service.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ describe("company-psc", () => {
140140

141141
it("uses default values for startIndex and itemsPerPage when not provided", async () => {
142142
await companyPsc.getCompanyPsc("123");
143-
expect(mockRequest.calledWith("/company/123/persons-with-significant-control?start_index=0&items_per_page=25")).to.be.true;
143+
expect(mockRequest.calledWith("/company/123/persons-with-significant-control?start_index=0&items_per_page=30")).to.be.true;
144144
});
145145

146146
it("uses provided startIndex and itemsPerPage values", async () => {
@@ -155,7 +155,7 @@ describe("company-psc", () => {
155155

156156
it("uses default itemsPerPage when not provided and startIndex is provided", async () => {
157157
await companyPsc.getCompanyPsc("123", 10);
158-
expect(mockRequest.calledWith("/company/123/persons-with-significant-control?start_index=10&items_per_page=25")).to.be.true;
158+
expect(mockRequest.calledWith("/company/123/persons-with-significant-control?start_index=10&items_per_page=30")).to.be.true;
159159
});
160160

161161
it("uses provided headers", async () => {

0 commit comments

Comments
 (0)