From be146fc237c5266ee9d03472e06bc5e04ac04d12 Mon Sep 17 00:00:00 2001 From: sigmaSd Date: Mon, 22 Feb 2021 14:37:36 +0100 Subject: [PATCH] fix send file test (#43) --- tests/send_file.rs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/tests/send_file.rs b/tests/send_file.rs index 068c085..41a75f0 100644 --- a/tests/send_file.rs +++ b/tests/send_file.rs @@ -1,6 +1,7 @@ #![cfg(feature = "ui-test")] -use termchat::application::{Application, Event, Config}; +use termchat::application::{Application, Event}; +use termchat::config::Config; use message_io::events::EventSender; #[test] @@ -14,18 +15,8 @@ fn send_file() { std::fs::write(&test_path, &data).unwrap(); // spawn users - let config1: Config = Config { - discovery_addr: "238.255.0.1:5877".parse().unwrap(), - tcp_server_port: "0".parse().unwrap(), - user_name: 1.to_string(), - terminal_bell: false, - }; - let config2: Config = Config { - discovery_addr: "238.255.0.1:5877".parse().unwrap(), - tcp_server_port: "0".parse().unwrap(), - user_name: 2.to_string(), - terminal_bell: false, - }; + let config1: Config = Config { user_name: 1.to_string(), ..Config::default() }; + let config2: Config = Config { user_name: 2.to_string(), ..Config::default() }; let (mut s1, t1) = test_user(config1); // wait a bit or termchat will creates two-communication channels at the same time std::thread::sleep(std::time::Duration::from_millis(100));