From 861c933c568f42f02cb6b0a0cb24f50d4d35aaeb Mon Sep 17 00:00:00 2001
From: Emmanuel Gil Peyrot
Date: Thu, 20 Apr 2017 00:43:17 +0100
Subject: [PATCH] body, chatstates: Fix tests.
---
src/body.rs | 24 ++++++++++++------------
src/chatstates.rs | 2 +-
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/body.rs b/src/body.rs
index 43c6c833..d02e508c 100644
--- a/src/body.rs
+++ b/src/body.rs
@@ -24,45 +24,45 @@ pub fn parse_body(root: &Element) -> Result {
mod tests {
use minidom::Element;
use error::Error;
- use chatstates;
+ use body;
#[test]
fn test_simple() {
- let elem: Element = "".parse().unwrap();
- chatstates::parse_chatstate(&elem).unwrap();
+ let elem: Element = "".parse().unwrap();
+ body::parse_body(&elem).unwrap();
}
#[test]
fn test_invalid() {
- let elem: Element = "".parse().unwrap();
- let error = chatstates::parse_chatstate(&elem).unwrap_err();
+ let elem: Element = "
".parse().unwrap();
+ let error = body::parse_body(&elem).unwrap_err();
let message = match error {
Error::ParseError(string) => string,
_ => panic!(),
};
- assert_eq!(message, "Unknown child in chatstate element.");
+ assert_eq!(message, "Unknown child in body element.");
}
#[test]
#[ignore]
fn test_invalid_attribute() {
- let elem: Element = "".parse().unwrap();
- let error = chatstates::parse_chatstate(&elem).unwrap_err();
+ let elem: Element = "