diff --git a/tests/test_config.py b/tests/test_config.py index f1b09a3..e4dc273 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -81,3 +81,25 @@ def test_get_default_config_path(): assert path.name == "config.toml" assert ".config" in str(path) assert "zzpyjenkins" in str(path) + + +def test_full_config_flow(): + """Test complete config loading flow with temp file.""" + with tempfile.NamedTemporaryFile(mode="w", suffix=".toml", delete=False) as f: + f.write(""" +[work] +url = "https://jenkins.example.com" +username = "testuser" +password = "testpass" +""") + temp_path = Path(f.name) + + try: + config = load_config(temp_path) + url, username, password = get_server_config(config, "work") + + assert url == "https://jenkins.example.com" + assert username == "testuser" + assert password == "testpass" + finally: + temp_path.unlink()