|
|
|
|
@ -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) |
|
|
|
|
}) |
|
|
|
|
|