Update tests

This commit is contained in:
2026-08-21 11:55:27 +03:00
parent efcee8b90a
commit 5954c68682
5 changed files with 31 additions and 16 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ import Control.Concurrent.STM
, writeTChan
)
import Data.Aeson (Value (..))
import HomeAssistant.Controller (HASSEff (..), Service (..))
import HomeAssistant.Controller (HASSEff (..), Service (..), Target(..))
import HomeAssistant.Runtime.Bus
import Test.Hspec
@@ -28,7 +28,7 @@ spec = describe "Bus" $ do
it "channelHassEval writes CallService to the outbound channel" $ do
bus <- newBus 0
let svc = Service "light" "turn_on" Nothing "light.bedroom_masse"
let svc = Service "light" "turn_on" Nothing [EntityId "light.bedroom_masse"]
channelHassEval bus (CallService svc)
atomically (readTChan (busOutbound bus)) `shouldReturn` svc