test: attachment data
This commit is contained in:
		
							parent
							
								
									dd6b84536e
								
							
						
					
					
						commit
						4113f18da5
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		|  | @ -3,6 +3,7 @@ import { setupTestApp } from '../../setup-tests.js'; | |||
| import { getAttachmentRepository } from '../../../src/data/repositories.js'; | ||||
| import { AttachmentRepository } from '../../../src/data/content/attachment-repository.js'; | ||||
| import { testLearningObject02 } from '../../test_assets/content/learning-objects.testdata'; | ||||
| import { getAttachment01 } from '../../test_assets/content/attachments.testdata.js'; | ||||
| 
 | ||||
| describe('AttachmentRepository', () => { | ||||
|     let attachmentRepository: AttachmentRepository; | ||||
|  | @ -13,10 +14,11 @@ describe('AttachmentRepository', () => { | |||
|     }); | ||||
| 
 | ||||
|     it('should return the requested attachment', async () => { | ||||
|         const usedAttachment = getAttachment01(); | ||||
|         const attachment = await attachmentRepository.findByMostRecentVersionOfLearningObjectAndName( | ||||
|             testLearningObject02.hruid, | ||||
|             testLearningObject02.language, | ||||
|             'attachment01' | ||||
|             usedAttachment.learningObject.hruid, | ||||
|             usedAttachment.learningObject.language, | ||||
|             usedAttachment.name | ||||
|         ); | ||||
| 
 | ||||
|         expect(attachment).toBeTruthy(); | ||||
|  |  | |||
		Reference in a new issue
	
	 laurejablonski
						laurejablonski