use csscolorparser::Color;

use crate::codegen::SvgDocument;

#[test]
fn test_flood_simple() {
    let mut doc = SvgDocument::new();

    let turbdispl = doc.create_filter("noiseDisplace");

    turbdispl.flood(Color::new(0.9, 0.7, 0.85, 1.), 1.);

    assert_eq!(
        doc.generate_svg(),
        r##"<svg><filter id="noiseDisplace"><feFlood flood-color="#e6b3d9" flood-opacity="1"/></filter></svg>"##
    );
}
