Simplify channelHassEval now that the writer owns the flag decision

This commit is contained in:
2026-09-30 08:56:07 +03:00
parent c2425e8fb0
commit 526710ef71
2 changed files with 11 additions and 14 deletions
+3 -2
View File
@@ -43,14 +43,15 @@ spec = describe "Bus" $ do
(_, svc') <- atomically $ readTChan (busOutbound bus)
svc' `shouldBe` svc
it "channelHassEval drops CallService when the handler is disabled" $
it "channelHassEval writes CallService to the outbound channel even when the handler is disabled" $
withTestFlagsBus $ \bus -> do
setEnabled (busFlags bus) "test-handler" False
let req = Request (UTCTime (toEnum 0) 0) utc nil "test-handler"
svc = Service "light" "turn_on" Nothing [EntityId "light.test"]
runKatipContextT (busLogEnv bus) () (Namespace ["test"]) $
channelHassEval bus (CallService req svc)
atomically (isEmptyTChan (busOutbound bus)) `shouldReturn` True
(_, svc') <- atomically $ readTChan (busOutbound bus)
svc' `shouldBe` svc
it "generates unique sequential call ids" $ do