Skip to content

Commit 25b3497

Browse files
Merge pull request #33 from companieshouse/feature/add_super_secure_tag
Add optional super secure tag to company profile
2 parents 7aab5b4 + f8039ed commit 25b3497

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/services/company-profile/service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export default class CompanyProfileService {
4949
jurisdiction: body.jurisdiction,
5050
sicCodes: body.sic_codes,
5151
hasBeenLiquidated: body.has_been_liquidated,
52+
hasSuperSecurePscs: body?.has_super_secure_pscs,
5253
type: body.type,
5354
hasCharges: body.has_charges,
5455
hasInsolvencyHistory: body.has_insolvency_history,

src/services/company-profile/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export interface CompanyProfileResource {
1010
jurisdiction: string;
1111
sic_codes: string[];
1212
has_been_liquidated: boolean;
13+
has_super_secure_pscs?: boolean;
1314
type: string;
1415
has_charges: boolean;
1516
has_insolvency_history: boolean;
@@ -95,6 +96,7 @@ export interface CompanyProfile {
9596
jurisdiction: string;
9697
sicCodes: string[];
9798
hasBeenLiquidated: boolean;
99+
hasSuperSecurePscs?: boolean;
98100
type: string;
99101
hasCharges: boolean;
100102
hasInsolvencyHistory: boolean;

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ describe("company-profile", () => {
4646
company_status_detail: "not sure",
4747
sic_codes: ["85100"],
4848
has_been_liquidated: false,
49+
has_super_secure_pscs: false,
4950
type: "private-limited-shares-section-30-exemption",
5051
has_charges: false,
5152
has_insolvency_history: true,
@@ -95,6 +96,7 @@ describe("company-profile", () => {
9596
expect(data.resource.jurisdiction).to.equal(mockResponseBody.jurisdiction);
9697
expect(data.resource.sicCodes).to.eql(mockResponseBody.sic_codes);
9798
expect(data.resource.hasBeenLiquidated).to.equal(mockResponseBody.has_been_liquidated);
99+
expect(data.resource.hasSuperSecurePscs).to.equal(mockResponseBody.has_super_secure_pscs);
98100
expect(data.resource.type).to.equal(mockResponseBody.type);
99101
expect(data.resource.hasCharges).to.equal(mockResponseBody.has_charges);
100102
expect(data.resource.hasInsolvencyHistory).to.equal(mockResponseBody.has_insolvency_history);
@@ -116,7 +118,7 @@ describe("company-profile", () => {
116118
expect(data.resource.links.filingHistory).to.equal(mockResponseBody.links.filing_history);
117119
});
118120

119-
it("maps the company field data items correctly when registered office, accounts, confirmation statement and links are missing", async () => {
121+
it("maps the company field data items correctly when registered office, accounts, confirmation statement, links, and super_secure_pscs are missing", async () => {
120122
const mockResponseBody : CompanyProfileResource = ({
121123
company_name: "HELLO LTD",
122124
company_number: "88",
@@ -172,5 +174,6 @@ describe("company-profile", () => {
172174
expect(data.resource.confirmationStatement.nextDue).to.be.undefined;
173175
expect(data.resource.confirmationStatement.overdue).to.be.undefined;
174176
expect(data.resource.links.filingHistory).to.be.undefined;
177+
expect(data.resource.hasSuperSecurePscs).to.be.undefined;
175178
});
176179
});

0 commit comments

Comments
 (0)