diff options
Diffstat (limited to 'modules/structs/commit_status_test.go')
-rw-r--r-- | modules/structs/commit_status_test.go | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/modules/structs/commit_status_test.go b/modules/structs/commit_status_test.go deleted file mode 100644 index c11daf248d..0000000000 --- a/modules/structs/commit_status_test.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2023 The Gitea Authors. All rights reserved. -// SPDX-License-Identifier: MIT - -package structs - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestNoBetterThan(t *testing.T) { - tests := []struct { - s1, s2 CommitStatusState - higher bool - }{ - {CommitStatusError, CommitStatusFailure, true}, - {CommitStatusFailure, CommitStatusWarning, true}, - {CommitStatusWarning, CommitStatusPending, true}, - {CommitStatusPending, CommitStatusSuccess, true}, - {CommitStatusSuccess, CommitStatusSkipped, true}, - - {CommitStatusError, "unknown-xxx", false}, - {"unknown-xxx", CommitStatusFailure, true}, - } - for _, tt := range tests { - assert.Equal(t, tt.higher, tt.s1.HasHigherPriorityThan(tt.s2), "s1=%s, s2=%s, expected=%v", tt.s1, tt.s2, tt.higher) - } - assert.False(t, CommitStatusError.HasHigherPriorityThan(CommitStatusError)) -} |