mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-10 10:06:15 -08:00
test(stalker): align simple portal session guard
This commit is contained in:
1 parent
79d3fb9dbd
commit
a4e74f425f
1 file changed
+9
-3
@@ -995,7 +995,7 @@ describe('StreamResolverService', () => {
|
||||
expect(playback.headers?.['Authorization']).toBeUndefined();
|
||||
});
|
||||
|
||||
it('does not authenticate a simple portal for playback headers', async () => {
|
||||
it('guards a simple portal without requiring playback auth headers', async () => {
|
||||
playlistsService.getPlaylistById.mockReturnValue(
|
||||
of({
|
||||
_id: 'stalker-2',
|
||||
@@ -1006,7 +1006,7 @@ describe('StreamResolverService', () => {
|
||||
);
|
||||
stalkerSession.getCachedToken.mockReturnValue(null);
|
||||
|
||||
await service.resolvePlayback({
|
||||
const playback = await service.resolvePlayback({
|
||||
uid: 'stalker::stalker-2::99',
|
||||
name: 'Simple Radio',
|
||||
contentType: 'live',
|
||||
@@ -1018,7 +1018,13 @@ describe('StreamResolverService', () => {
|
||||
stalkerCmd: 'https://simple.example.com/radio/99.mp3',
|
||||
} satisfies UnifiedCollectionItem);
|
||||
|
||||
expect(stalkerSession.ensureToken).not.toHaveBeenCalled();
|
||||
expect(stalkerSession.ensureToken).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
_id: 'stalker-2',
|
||||
isFullStalkerPortal: false,
|
||||
})
|
||||
);
|
||||
expect(playback.headers?.['Authorization']).toBeUndefined();
|
||||
});
|
||||
|
||||
it('keeps Stalker collection playback from a foreign CDN credential-free', async () => {
|
||||
|
||||
Reference in new issue
Block a user