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 = {
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)
})

Loading…
Cancel
Save