From 38be5e037e5e15fd8710afe5d6ab4d90df46912f Mon Sep 17 00:00:00 2001 From: Andrei Dekterev Date: Mon, 25 Apr 2022 21:36:06 +0700 Subject: [PATCH] fix(#2388): change tests --- .../helpers/getMatchClickAction/__tests__/index.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/features/Matches/helpers/getMatchClickAction/__tests__/index.tsx b/src/features/Matches/helpers/getMatchClickAction/__tests__/index.tsx index 30f2d193..176f9500 100644 --- a/src/features/Matches/helpers/getMatchClickAction/__tests__/index.tsx +++ b/src/features/Matches/helpers/getMatchClickAction/__tests__/index.tsx @@ -5,6 +5,7 @@ import { getMatchAccess, MatchAccess } from '..' type Args = { access?: boolean, calc?: boolean, + date?: string, has_video?: boolean, live?: boolean, storage?: boolean, @@ -28,6 +29,7 @@ it('equals to redirect type', () => { const match = createMatch({ access: true, calc: false, + date: '2020-01-01 00:00:00', has_video: true, sub: true, }) @@ -47,6 +49,7 @@ it('equals to can buy type', () => { it('equals to view match popup type', () => { let match = createMatch({ access: true, + date: '2020-01-01 00:00:00', live: true, sub: true, }) @@ -56,6 +59,7 @@ it('equals to view match popup type', () => { match = createMatch({ access: true, calc: true, + date: '2022-01-01 00:00:00', has_video: true, live: false, sub: true, @@ -66,11 +70,12 @@ it('equals to view match popup type', () => { match = createMatch({ access: true, calc: true, + date: '2040-01-01 00:00:00', has_video: false, - live: false, + live: true, storage: true, sub: true, }) - expect(getMatchAccess(match)).toBe(MatchAccess.RedirectToProfile) + expect(getMatchAccess(match)).toBe(MatchAccess.ViewMatchPopup) })