snapshot of https://github.com/traggo/server.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
build / build (push) Failing after 3s
Some checks failed
build / build (push) Failing after 3s
This commit is contained in:
17
model/all_test.go
Normal file
17
model/all_test.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package model_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/traggo/server/model"
|
||||
)
|
||||
|
||||
func TestAll_NoDuplicateEntries(t *testing.T) {
|
||||
all := model.All()
|
||||
var checkedItems []interface{}
|
||||
for _, item := range all {
|
||||
assert.NotContains(t, checkedItems, item)
|
||||
checkedItems = append(checkedItems, item)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user