fix(#2388): change tests

keep-around/38be5e037e5e15fd8710afe5d6ab4d90df46912f
Andrei Dekterev 4 years ago
parent 3f12577e1e
commit 38be5e037e
  1. 9
      src/features/Matches/helpers/getMatchClickAction/__tests__/index.tsx

@ -5,6 +5,7 @@ import { getMatchAccess, MatchAccess } from '..'
type Args = { type Args = {
access?: boolean, access?: boolean,
calc?: boolean, calc?: boolean,
date?: string,
has_video?: boolean, has_video?: boolean,
live?: boolean, live?: boolean,
storage?: boolean, storage?: boolean,
@ -28,6 +29,7 @@ it('equals to redirect type', () => {
const match = createMatch({ const match = createMatch({
access: true, access: true,
calc: false, calc: false,
date: '2020-01-01 00:00:00',
has_video: true, has_video: true,
sub: true, sub: true,
}) })
@ -47,6 +49,7 @@ it('equals to can buy type', () => {
it('equals to view match popup type', () => { it('equals to view match popup type', () => {
let match = createMatch({ let match = createMatch({
access: true, access: true,
date: '2020-01-01 00:00:00',
live: true, live: true,
sub: true, sub: true,
}) })
@ -56,6 +59,7 @@ it('equals to view match popup type', () => {
match = createMatch({ match = createMatch({
access: true, access: true,
calc: true, calc: true,
date: '2022-01-01 00:00:00',
has_video: true, has_video: true,
live: false, live: false,
sub: true, sub: true,
@ -66,11 +70,12 @@ it('equals to view match popup type', () => {
match = createMatch({ match = createMatch({
access: true, access: true,
calc: true, calc: true,
date: '2040-01-01 00:00:00',
has_video: false, has_video: false,
live: false, live: true,
storage: true, storage: true,
sub: true, sub: true,
}) })
expect(getMatchAccess(match)).toBe(MatchAccess.RedirectToProfile) expect(getMatchAccess(match)).toBe(MatchAccess.ViewMatchPopup)
}) })

Loading…
Cancel
Save