Skip to content

Commit

Permalink
add test for updateCounty
Browse files Browse the repository at this point in the history
  • Loading branch information
hoeppner-dataport committed Jan 17, 2025
1 parent ff2dc0e commit 99cefae
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apps/server/src/modules/school/domain/do/school.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ describe('School', () => {
expect(school.getProps().county).toEqual(county);
});
});

describe('when school has no defined federalState', () => {
it('should throw `County cannot be set without a federal state being assigned to the school.` error', () => {
const school = schoolFactory.build({ federalState: undefined });

expect(() => school.updateCounty('abc')).toThrowError(
'County cannot be set without a federal state being assigned to the school.'
);
});
});
});

describe('updateOfficialSchoolNumber', () => {
Expand Down

0 comments on commit 99cefae

Please sign in to comment.