states are explicit

This commit is contained in:
Bel LaPointe
2022-01-27 17:27:08 -07:00
parent e19cd7095d
commit 5406250af3
7 changed files with 25 additions and 21 deletions

View File

@@ -34,7 +34,7 @@ func TestFastExactReal(t *testing.T) {
if err := fe.login(); err != nil {
t.Fatal(err)
}
jobs, err := fe.search(states)
jobs, err := fe.searchStates(states)
if err != nil {
t.Fatal(err)
}
@@ -56,14 +56,14 @@ func TestFastExactLogin(t *testing.T) {
}
}
func TestFastExactSearch(t *testing.T) {
func TestFastExactSearchStates(t *testing.T) {
logtr.SetLevel(logtr.SOS)
limiter = rate.NewLimiter(rate.Limit(60.0), 1)
fe := NewFastExact().WithMock()
_ = fe
db := storage.NewMap()
_ = db
if jobs, err := fe.search([]config.State{config.State("NC"), config.State("SC")}); err != nil {
if jobs, err := fe.searchStates([]config.State{config.State("NC"), config.State("SC")}); err != nil {
t.Fatal(err)
} else if len(jobs) != 10 {
t.Fatal(len(jobs))