diff --git a/tests/components/whois/test_config_flow.py b/tests/components/whois/test_config_flow.py index e6b46bd07bec..5fb67728f3c7 100644 --- a/tests/components/whois/test_config_flow.py +++ b/tests/components/whois/test_config_flow.py @@ -141,12 +141,18 @@ async def test_already_configured( mock_config_entry.add_to_hass(hass) result = await hass.config_entries.flow.async_init( - DOMAIN, - context={"source": SOURCE_USER}, - data={CONF_DOMAIN: "HOME-Assistant.io"}, + DOMAIN, context={"source": SOURCE_USER} ) - assert result.get("type") is FlowResultType.ABORT - assert result.get("reason") == "already_configured" + assert result.get("type") is FlowResultType.FORM + assert result.get("step_id") == "user" + + result2 = await hass.config_entries.flow.async_configure( + result["flow_id"], + user_input={CONF_DOMAIN: "HOME-Assistant.io"}, + ) + + assert result2.get("type") is FlowResultType.ABORT + assert result2.get("reason") == "already_configured" assert len(mock_setup_entry.mock_calls) == 0