Skip to content

Commit 475812e

Browse files
committed
fix: IsFreezetimePeriod in mock
1 parent 70282f0 commit 475812e

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

pkg/demoinfocs/fake/game_state.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ func (gs *GameState) IsWarmupPeriod() bool {
8585
return gs.Called().Bool(0)
8686
}
8787

88+
// IsFreezetimePeriod is a mock-implementation of GameState.IsFreezetimePeriod().
89+
func (gs *GameState) IsFreezetimePeriod() bool {
90+
return gs.Called().Bool(0)
91+
}
92+
8893
// IsMatchStarted is a mock-implementation of GameState.IsMatchStarted().
8994
func (gs *GameState) IsMatchStarted() bool {
9095
return gs.Called().Bool(0)

pkg/demoinfocs/game_state_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,12 @@ func TestGameRules(t *testing.T) {
353353
assert.Equal(t, ErrFailedToRetrieveGameRule, err)
354354
}
355355

356+
func TestGameRules_IsFreezetimePeriod(t *testing.T) {
357+
gs := gameState{isFreezetime: true}
358+
359+
assert.Equal(t, true, gs.IsFreezetimePeriod())
360+
}
361+
356362
func newPlayerS1() *common.Player {
357363
pl := newPlayerWithEntityIDS1(1)
358364
return pl

test/default.golden

1.12 KB
Binary file not shown.

0 commit comments

Comments
 (0)