heater/pkg/device/device_test.go

25 lines
414 B
Go

package device
import (
"testing"
)
var goodDefaultDevice = Device {
Name: "valid",
Settings: DefaultDeviceSettings,
CurrentSetpoint: 0,
State: DeviceState{},
}
func TestStateTopic(t *testing.T) {
topic := goodDefaultDevice.StateTopic()
if topic != "heater/valid/state" {
t.Errorf("Got %s; want heater/valid/state", topic)
}
}
func TestCheckSetpoint(t *testing.T) {
}