Added a regression test for sending raw messages (see #128).
This commit is contained in:
parent
4ac8c699d6
commit
984fbe9ba8
1 changed files with 13 additions and 1 deletions
|
@ -847,7 +847,7 @@ mod test {
|
|||
#[cfg(not(feature = "nochanlists"))]
|
||||
use client::data::User;
|
||||
use proto::{ChannelMode, IrcCodec, Mode};
|
||||
use proto::command::Command::{PART, PRIVMSG};
|
||||
use proto::command::Command::{PART, PRIVMSG, Raw};
|
||||
|
||||
pub fn test_config() -> Config {
|
||||
Config {
|
||||
|
@ -1072,6 +1072,18 @@ mod test {
|
|||
assert_eq!(&get_client_value(client)[..], "PRIVMSG #test :Hi there!\r\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn send_raw_is_really_raw() {
|
||||
let client = IrcClient::from_config(test_config()).unwrap();
|
||||
assert!(
|
||||
client.send(Raw("PASS".to_owned(), vec!["password".to_owned()], None)).is_ok()
|
||||
);
|
||||
assert!(
|
||||
client.send(Raw("NICK".to_owned(), vec!["test".to_owned()], None)).is_ok()
|
||||
);
|
||||
assert_eq!(&get_client_value(client)[..], "PASS password\r\nNICK test\r\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "nochanlists"))]
|
||||
fn channel_tracking_names() {
|
||||
|
|
Loading…
Reference in a new issue