Keep channel details bound to the current selection and session

This commit is contained in:
omar committed 2026-11-27 12:43:01 +03:00
1 parent 061bb2d33c
commit 4fee4c0ce6
10 files changed
+348 -23

No files matched your search

+17
View File
@@ -290,6 +290,23 @@ fn client_menu_commands_are_validated_and_never_fake_success_offline() {
core.shutdown();
}
#[test]
fn channel_queries_validate_arguments_before_connection_lookup() {
let dir = TempDir::new("channel-query-args");
let mut core = Core::start(&dir.0);
for cmd in ["channel_info", "channel_description", "channel_list"] {
let valid = if cmd == "channel_list" { json!({}) } else { json!({"channel_id": 1}) };
let mut extra = valid.clone(); extra["unexpected"] = json!(true);
for args in [extra, json!({"channel_id":0})] {
let (reply, _) = core.request("invalid", cmd, args);
assert_eq!(reply["error"]["code"], "bad_request", "{cmd}: {reply}");
}
let (reply, _) = core.request("valid", cmd, valid);
assert_eq!(reply["error"]["code"], "not_connected", "{cmd}: {reply}");
}
core.shutdown();
}
#[test]
fn file_browser_rejects_invalid_list_before_connection() {
let dir = TempDir::new("file-list-boundary");