Fix: use selected version when creating share links (#13571)

This commit is contained in:
shamoon authored and GitHub committed 2026-08-05 21:03:20 -07:00
1 parent 7b9e56ef22
commit 1824e5fafd
2 files changed
+9 -1

No files matched your search

@@ -2161,8 +2161,14 @@ describe('DocumentDetailComponent', () => {
it('should support open share links and email modals', () => {
const modalSpy = jest.spyOn(modalService, 'open')
initNormally()
component.selectedVersionId.set(10)
component.openShareLinks()
expect(modalSpy).toHaveBeenCalled()
expect(
(
modalSpy.mock.results[0].value as NgbModalRef
).componentInstance.documentId()
).toBe(10)
component.openEmailDocument()
expect(modalSpy).toHaveBeenCalled()
})