test: move tui tests to tests/

Kept inline: tui src/client.rs tests::{api_client_builds_versioned_urls,api_client_update_url} - ApiClient::api/url private.
This commit is contained in:
2026-10-25 22:49:11 +01:00
parent 08a97c9ee9
commit 5c5a8c3326
6 changed files with 58 additions and 64 deletions

View File

@@ -0,0 +1,16 @@
use tui::config::Config;
#[test]
fn config_survives_json_round_trip() {
let config = Config {
api_url: "http://localhost:3000".into(),
};
let json = serde_json::to_string(&config).unwrap();
let decoded: Config = serde_json::from_str(&json).unwrap();
assert_eq!(decoded.api_url, "http://localhost:3000");
}
#[test]
fn load_without_config_file_does_not_panic() {
let _ = Config::load();
}