#[cfg(test)]
mod tests {
    use south::{ManifestRepo, SouthManifest, SouthManifestBuilder};

    #[test]
    fn test_manifest() {
        let manifest = SouthManifestBuilder::new()
            .add_repo(ManifestRepo::new(
                String::from("south"),
                String::from("git@github.com:stephenkingston/south.git"),
                String::from("main"),
                None,
            ))
            .add_repo(ManifestRepo::new(
                String::from("avrman"),
                String::from("git@github.com:stephenkingston/avrman.git"),
                String::from("main"),
                None,
            ))
            .finish();

        // Write to file
        let yaml = serde_yaml::to_string(&manifest);

        std::fs::write("tests/south.yaml", yaml.unwrap()).unwrap();

        // Read from file
        let contents = std::fs::read_to_string("./tests/south.yaml").unwrap();
        let manifest_read: SouthManifest = serde_yaml::from_str(&contents).unwrap();
        assert_eq!(manifest, manifest_read);

        // Delete test file
        std::fs::remove_file("tests/south.yaml").unwrap();
    }
}
