mirror of
https://github.com/warmbly/warmbly.git
synced 2026-11-28 08:05:45 +00:00
17 lines
437 B
Go
17 lines
437 B
Go
package models
|
|
|
|
import "testing"
|
|
|
|
func TestContactTimelineSourceValid(t *testing.T) {
|
|
for s := TimelineSourceProgressSent; s <= TimelineSourcePageHit; s++ {
|
|
if !s.Valid() {
|
|
t.Fatalf("source %d is one the feed merges and must be valid", s)
|
|
}
|
|
}
|
|
for _, s := range []ContactTimelineSource{0, -1, TimelineSourcePageHit + 1, 99} {
|
|
if s.Valid() {
|
|
t.Fatalf("source %d names no table and must be rejected in a cursor", s)
|
|
}
|
|
}
|
|
}
|