Modified tests to reflect additions in the macros
This commit is contained in:
25
tests/tests_divisions.rs
Normal file
25
tests/tests_divisions.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use web_macro::{division, heading1};
|
||||
|
||||
#[test]
|
||||
fn test_base() {
|
||||
assert_eq!("<div>test</div>", division!("test"))
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_multiple_elements() {
|
||||
assert_eq!(
|
||||
"<div>\n<h1>one</h1>\n<h1>two</h1>\n</div>",
|
||||
division!(heading1!("one"), heading1!("two"))
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_multiple_elements_with_options() {
|
||||
assert_eq!(
|
||||
"<div id=\"division_id\">\n<h1>one</h1>\n<h1 class=\"tiny\">two</h1>\n</div>",
|
||||
division!(heading1!("one"), heading1!("two", class="tiny"), id="division_id")
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user