Skip to content

Commit

Permalink
fix: CE-1360 (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
nayr974 authored and afwilcox committed Jan 27, 2025
1 parent 0cba580 commit aea289d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion backend/src/v1/code-table/code-table.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ describe("Testing: CodeTable Service", () => {
//-- assert
expect(results).not.toBe(null);
expect(results.length).not.toBe(0);
expect(results.length).toBe(6);
expect(results.length).toBe(5);
});

it("should return collection of organization unit types", async () => {
Expand Down
7 changes: 0 additions & 7 deletions backend/test/mocks/mock-code-table-repositories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,6 @@ const natureOfComplaints = [
display_order: 3,
active_ind: true,
},
{
hwcr_complaint_nature_code: "COUGARN",
short_description: "COUGARN",
long_description: "Cougar suspected - killed/injured livestock/pets - not present",
display_order: 4,
active_ind: true,
},
{
hwcr_complaint_nature_code: "DAMNP",
short_description: "DAMNP",
Expand Down
6 changes: 6 additions & 0 deletions migrations/migrations/R__Create-Test-Data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9909,6 +9909,12 @@ VALUES
CURRENT_TIMESTAMP
) ON CONFLICT DO NOTHING;

UPDATE hwcr_complaint SET hwcr_complaint_nature_code = 'LIVNCOU' WHERE hwcr_complaint_nature_code = 'COUGARN';
DELETE FROM hwcr_complaint_nature_code WHERE hwcr_complaint_nature_code = 'COUGARN';
DELETE FROM hwcr_complaint_nature_code WHERE short_description = 'Livestock/pets - killed/injured - present/recent (Coyote/Bobcat)';
DELETE FROM hwcr_complaint_nature_code WHERE short_description = 'Livestock/pets - killed/injured - present/recent/suspected (Black/Grizzly Bear, Wolf, Cougar)';
DELETE FROM hwcr_complaint_nature_code WHERE short_description = 'Livestock/pets - killed/injured - not present (No Black/Grizzly Bear, Wolf, Cougar suspected)';
DELETE FROM hwcr_complaint_nature_code WHERE short_description = 'Livestock/pets - killed/injured - (No Black/Grizzly Bear, Wolf, Cougar suspected)';

--------------------------
-- New Changes above this line
Expand Down
4 changes: 2 additions & 2 deletions migrations/test-only-migrations/R__Test-Data-Creation.sql
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ VALUES('163d2996-0f09-48b7-b100-2810db7fc316'::uuid, NULL, 'FLYWAY', '2023-06-29
ON CONFLICT DO NOTHING;
INSERT INTO public.hwcr_complaint
(hwcr_complaint_guid, other_attractants_text, create_user_id, create_utc_timestamp, update_user_id, update_utc_timestamp, complaint_identifier, species_code, hwcr_complaint_nature_code)
VALUES('496f3ef1-bf6e-48ce-8858-7edb04572d40'::uuid, NULL, 'FLYWAY', '2023-06-29 22:16:16.754', 'FLYWAY', '2023-06-29 22:16:16.754', '23-000179', 'COUGAR', 'COUGARN')
VALUES('496f3ef1-bf6e-48ce-8858-7edb04572d40'::uuid, NULL, 'FLYWAY', '2023-06-29 22:16:16.754', 'FLYWAY', '2023-06-29 22:16:16.754', '23-000179', 'COUGAR', 'SGHTNGS')
ON CONFLICT DO NOTHING;
INSERT INTO public.hwcr_complaint
(hwcr_complaint_guid, other_attractants_text, create_user_id, create_utc_timestamp, update_user_id, update_utc_timestamp, complaint_identifier, species_code, hwcr_complaint_nature_code)
Expand Down Expand Up @@ -850,7 +850,7 @@ VALUES('9d9d43ca-7c0b-4830-824e-eea3839852b8'::uuid, NULL, 'FLYWAY', '2023-06-29
ON CONFLICT DO NOTHING;
INSERT INTO public.hwcr_complaint
(hwcr_complaint_guid, other_attractants_text, create_user_id, create_utc_timestamp, update_user_id, update_utc_timestamp, complaint_identifier, species_code, hwcr_complaint_nature_code)
VALUES('61740fa4-3329-4bc7-98fc-aea1142349e2'::uuid, NULL, 'FLYWAY', '2023-06-29 22:16:16.754', 'FLYWAY', '2023-06-29 22:16:16.754', '23-000079', 'COUGAR', 'COUGARN')
VALUES('61740fa4-3329-4bc7-98fc-aea1142349e2'::uuid, NULL, 'FLYWAY', '2023-06-29 22:16:16.754', 'FLYWAY', '2023-06-29 22:16:16.754', '23-000079', 'COUGAR', 'SGHTNGS')
ON CONFLICT DO NOTHING;
INSERT INTO public.hwcr_complaint
(hwcr_complaint_guid, other_attractants_text, create_user_id, create_utc_timestamp, update_user_id, update_utc_timestamp, complaint_identifier, species_code, hwcr_complaint_nature_code)
Expand Down

0 comments on commit aea289d

Please sign in to comment.