20 lines
348 B
Gleam
20 lines
348 B
Gleam
import config
|
|
import envoy
|
|
import gleeunit
|
|
import gleeunit/should
|
|
|
|
pub fn main() -> Nil {
|
|
gleeunit.main()
|
|
}
|
|
|
|
// gleeunit test functions end in `_test`
|
|
pub fn file_read_test() {
|
|
envoy.set("MQTT_PW", "TEST")
|
|
let cfg = config.load_config()
|
|
|
|
cfg.mqtt_host
|
|
|> should.equal("192.168.1.11")
|
|
|
|
cfg.mqtt_user
|
|
|> should.equal("homeassistant")
|
|
}
|