Rename switch to switchService to avoid AFRP name conflict
This commit is contained in:
+5
-5
@@ -62,18 +62,18 @@ drawerSpec = describe "bedroomDrawerController" $ do
|
||||
|
||||
it "turns the drawer light on when the drawer opens" $
|
||||
services (runHASS bedroomDrawerController [drawerState "on"])
|
||||
`shouldBe` [[switch [entity] True]]
|
||||
`shouldBe` [[switchService [entity] True]]
|
||||
|
||||
it "turns the drawer light off when the drawer closes" $
|
||||
services (runHASS bedroomDrawerController [drawerState "off"])
|
||||
`shouldBe` [[switch [entity] False]]
|
||||
`shouldBe` [[switchService [entity] False]]
|
||||
|
||||
it "toggles the light as the drawer opens and closes" $
|
||||
services (runHASS bedroomDrawerController
|
||||
[ drawerState "on", drawerState "off", drawerState "on" ])
|
||||
`shouldBe` [ [switch [entity] True]
|
||||
, [switch [entity] False]
|
||||
, [switch [entity] True]
|
||||
`shouldBe` [ [switchService [entity] True]
|
||||
, [switchService [entity] False]
|
||||
, [switchService [entity] True]
|
||||
]
|
||||
|
||||
it "ignores state events for other entities" $
|
||||
|
||||
Reference in New Issue
Block a user