Skip to content

Commit e67d673

Browse files
committed
test: add Plaintext deserialization test
Add `Plaintext` deserialization test.
1 parent 7070f3c commit e67d673

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/model.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ include!(concat!(env!("OUT_DIR"), "/model.rs"));
2727
mod tests {
2828
use serde_xml::from_str;
2929

30-
use super::{Img, Infos, Pod, QueryResult, Subpod};
30+
use super::{Img, Infos, Plaintext, Pod, QueryResult, Subpod};
3131

3232
#[test]
3333
fn test_query_result_deserializer() {
@@ -91,6 +91,12 @@ mod tests {
9191
from_str::<Img>(&s).unwrap();
9292
}
9393

94+
#[test]
95+
fn test_plaintext_deserializer() {
96+
from_str::<Plaintext>(&"<plaintext>pi</plaintext>".to_owned()).unwrap();
97+
from_str::<Option<Plaintext>>(&"<plaintext/>".to_owned()).unwrap();
98+
}
99+
94100
#[test]
95101
fn test_infos_deserializer() {
96102
let s = INFOS_STR.to_owned();

0 commit comments

Comments
 (0)