make working hours, weekdays configurable by impl ntg

This commit is contained in:
bel
2022-01-30 08:34:14 -07:00
parent 60f19968e3
commit bbe839bb88
3 changed files with 26 additions and 8 deletions

View File

@@ -1,11 +1,17 @@
package broker
import (
"local/truckstop/config"
"os"
"testing"
"time"
)
func TestWorkingHoursNTG(t *testing.T) {
os.Setenv("CONFIG", "../config.json")
if err := config.Refresh(nil); err != nil {
t.Fatal(err)
}
ntg := NTGVision{}
if !ntg.workingHours(time.Date(2022, 1, 27, 12, 0, 0, 0, time.FixedZone("MST", -7*60*60))) {
t.Fatal("noon MST not ok")