-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
N21-2103 cleanup, add missing unit tests
- Loading branch information
1 parent
317ef9a
commit 260d280
Showing
20 changed files
with
244 additions
and
138 deletions.
There are no files selected for viewing
File renamed without changes.
25 changes: 25 additions & 0 deletions
25
...c/media-licenses/loggable/school-for-school-media-license-sync-not-found.loggable.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { SchoolForSchoolMediaLicenseSyncNotFoundLoggable } from './school-for-school-media-license-sync-not-found.loggable'; | ||
|
||
describe(SchoolForSchoolMediaLicenseSyncNotFoundLoggable.name, () => { | ||
describe('getLogMessage', () => { | ||
const setup = () => { | ||
const officialSchoolNumber = '00100'; | ||
const exception = new SchoolForSchoolMediaLicenseSyncNotFoundLoggable(officialSchoolNumber); | ||
|
||
return { exception, officialSchoolNumber }; | ||
}; | ||
|
||
it('should return the correct log message', () => { | ||
const { exception, officialSchoolNumber } = setup(); | ||
|
||
const logMessage = exception.getLogMessage(); | ||
|
||
expect(logMessage).toEqual({ | ||
message: 'Unable to sync media school license, because school cannot be found.', | ||
data: { | ||
officialSchoolNumber, | ||
}, | ||
}); | ||
}); | ||
}); | ||
}); |
5 changes: 2 additions & 3 deletions
5
...-media-license-sync-not-found.loggable.ts → ...-media-license-sync-not-found.loggable.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { VidisResponse } from './vidis.response'; | ||
export { VidisItemResponse } from './vidis-item.response'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/server/src/infra/sync/media-licenses/testing/vidis-item.response.factory.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
147 changes: 105 additions & 42 deletions
147
apps/server/src/modules/media-source/repo/media-source-config.mapper.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.