mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 04:50:05 +00:00
Reorganize trigger code (#38655)
This commit is contained in:
@@ -861,6 +861,22 @@ async def test_automation_not_trigger_on_bootstrap(hass):
|
||||
assert ["hello.world"] == calls[0].data.get(ATTR_ENTITY_ID)
|
||||
|
||||
|
||||
async def test_automation_bad_trigger(hass, caplog):
|
||||
"""Test bad trigger configuration."""
|
||||
assert await async_setup_component(
|
||||
hass,
|
||||
automation.DOMAIN,
|
||||
{
|
||||
automation.DOMAIN: {
|
||||
"alias": "hello",
|
||||
"trigger": {"platform": "automation"},
|
||||
"action": [],
|
||||
}
|
||||
},
|
||||
)
|
||||
assert "Integration 'automation' does not provide trigger support." in caplog.text
|
||||
|
||||
|
||||
async def test_automation_with_error_in_script(hass, caplog):
|
||||
"""Test automation with an error in script."""
|
||||
assert await async_setup_component(
|
||||
|
||||
Reference in New Issue
Block a user