fn test_render_mount_section()

in metalos/lib/systemd/src/render.rs [188:236]


    fn test_render_mount_section() {
        assert_eq!(
            MountSection {
                what: "/dev/test".into(),
                where_: "/test/mountpoint".into(),
                options: Some("ro,something".to_string()),
                type_: Some("btrfs".to_string()),
            }
            .render(),
            "\
            [Mount]\n\
            What=/dev/test\n\
            Where=/test/mountpoint\n\
            Options=ro,something\n\
            Type=btrfs\n\
            "
        );
        assert_eq!(
            MountSection {
                what: "/dev/test".into(),
                where_: "/test/mountpoint".into(),
                options: None,
                type_: Some("btrfs".to_string()),
            }
            .render(),
            "\
            [Mount]\n\
            What=/dev/test\n\
            Where=/test/mountpoint\n\
            Options=\n\
            Type=btrfs\n\
            "
        );
        assert_eq!(
            MountSection {
                what: "/dev/test".into(),
                where_: "/test/mountpoint".into(),
                options: None,
                type_: None
            }
            .render(),
            "\
            [Mount]\n\
            What=/dev/test\n\
            Where=/test/mountpoint\n\
            Options=\n\
            "
        );
    }