</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pipes/object-name.pipe.ts</context>
- <context context-type="linenumber">43</context>
+ <context context-type="linenumber">40</context>
+ </context-group>
+ <context-group purpose="location">
+ <context context-type="sourcefile">src/app/pipes/object-name.pipe.ts</context>
+ <context context-type="linenumber">46</context>
</context-group>
</trans-unit>
<trans-unit id="2504502765849142619" datatype="html">
})
})
- it('should return empty string if object not found', (done) => {
+ it('should return Private string if object not found', (done) => {
const mockObjects = {
results: [{ id: 2, name: 'Object 2' }],
count: 1,
jest.spyOn(objectService, 'listAll').mockReturnValue(of(mockObjects))
pipe.transform(1).subscribe((result) => {
- expect(result).toBe('')
+ expect(result).toBe('Private')
done()
})
})
return this.objectService.listAll().pipe(
map((objects) => {
this.objects = objects.results
- return this.objects.find((o) => o.id === obejctId)?.name || ''
+ return (
+ this.objects.find((o) => o.id === obejctId)?.name ||
+ $localize`Private`
+ )
}),
catchError(() => of(''))
)