Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
stigoleg committed Dec 20, 2024
1 parent 93ba278 commit f3159c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/ui/ui_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ func TestTimeRemaining(t *testing.T) {
StartTime: now,
Duration: 5 * time.Minute,
KeepAlive: keeper,
State: stateRunning,
},
wantZero: false,
wantRange: 5 * time.Minute,
Expand All @@ -190,7 +191,7 @@ func TestTimeRemaining(t *testing.T) {
if tt.wantZero && got != 0 {
t.Errorf("TimeRemaining() = %v, want 0", got)
}
if !tt.wantZero && (got <= 0 || got > tt.wantRange) {
if !tt.wantZero && (got < 0 || got > tt.wantRange) {
t.Errorf("TimeRemaining() = %v, want between 0 and %v", got, tt.wantRange)
}
})
Expand Down

0 comments on commit f3159c7

Please sign in to comment.