aboutsummaryrefslogtreecommitdiffstats
path: root/document_tree/src
diff options
context:
space:
mode:
Diffstat (limited to 'document_tree/src')
-rw-r--r--document_tree/src/lib.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/document_tree/src/lib.rs b/document_tree/src/lib.rs
index 324fc44..9154725 100644
--- a/document_tree/src/lib.rs
+++ b/document_tree/src/lib.rs
@@ -19,12 +19,16 @@ pub use self::element_categories::HasChildren;
#[cfg(test)]
mod tests {
use super::*;
+ use std::default::Default;
#[test]
fn imperative() {
let mut doc = Document::default();
let mut title = Title::default();
+ let url = "https://example.com/image.jpg".parse().unwrap();
+ let image = ImageInline::with_extra(extra_attributes::ImageInline::new(url));
title.append_child("Hi");
+ title.append_child(image);
doc.append_child(title);
println!("{:?}", doc);
@@ -34,7 +38,10 @@ mod tests {
fn descriptive() {
let doc = Document::with_children(vec![
Title::with_children(vec![
- "Hi".into()
+ "Hi".into(),
+ ImageInline::with_extra(extra_attributes::ImageInline::new(
+ "https://example.com/image.jpg".parse().unwrap()
+ )).into(),
]).into()
]);