pub fn invoice_fixture() -> crate::Invoice {
    let labels = vec![
        crate::Label {
            sha256: "abcdef1234567890987654321".to_owned(),
            media_type: "text/toml".to_owned(),
            name: "foo.toml".to_owned(),
            size: 101,
            ..Default::default()
        },
        crate::Label {
            sha256: "bbcdef1234567890987654321".to_owned(),
            media_type: "text/toml".to_owned(),
            name: "foo2.toml".to_owned(),
            size: 101,
            ..Default::default()
        },
        crate::Label {
            sha256: "cbcdef1234567890987654321".to_owned(),
            media_type: "text/toml".to_owned(),
            name: "foo3.toml".to_owned(),
            size: 101,
            ..Default::default()
        },
    ];

    crate::Invoice {
        bindle_version: crate::BINDLE_VERSION_1.to_owned(),
        yanked: None,
        annotations: None,
        bindle: crate::BindleSpec {
            id: "foo/1.2.3".parse().unwrap(),
            description: Some("bar".to_owned()),
            authors: Some(vec!["m butcher".to_owned()]),
        },
        parcel: Some(
            labels
                .iter()
                .map(|l| crate::Parcel {
                    label: l.clone(),
                    conditions: None,
                })
                .collect(),
        ),
        group: None,
    }
}
/// Creates a fake invoice for use in testing
Creates a fake invoice for use in testing
Creates a fake invoice for use in testing
pub fn invoice_fixture() -> crate::Invoice {
    let labels = vec![
        crate::Label {
            sha256: "abcdef1234567890987654321".to_owned(),
            media_type: "text/toml".to_owned(),
            name: "foo.toml".to_owned(),
            size: 101,
            ..Default::default()
        },
        crate::Label {
            sha256: "bbcdef1234567890987654321".to_owned(),
            media_type: "text/toml".to_owned(),
            name: "foo2.toml".to_owned(),
            size: 101,
            ..Default::default()
        },
        crate::Label {
            sha256: "cbcdef1234567890987654321".to_owned(),
            media_type: "text/toml".to_owned(),
            name: "foo3.toml".to_owned(),
            size: 101,
            ..Default::default()
        },
    ];
    crate::Invoice {
        bindle_version: crate::BINDLE_VERSION_1.to_owned(),
        yanked: None,
        annotations: None,
        bindle: crate::BindleSpec {
            id: "foo/1.2.3".parse().unwrap(),
            description: Some("bar".to_owned()),
            authors: Some(vec!["m butcher".to_owned()]),
        },
        parcel: Some(
            labels
                .iter()
                .map(|l| crate::Parcel {
                    label: l.clone(),
                    conditions: None,
                })
                .collect(),
        ),
        group: None,
    }
}
pub fn invoice_fixture ( ) -> crate :: Invoice { let labels = vec ! [ crate Label { sha256 " " to_owned ( ) media_type " " to_owned ( ) name " " to_owned ( ) size 101 Default default ( ) } crate Label { sha256 " " to_owned ( ) media_type " " to_owned ( ) name " " to_owned ( ) size 101 Default default ( ) } crate Label { sha256 " " to_owned ( ) media_type " " to_owned ( ) name " " to_owned ( ) size 101 Default default ( ) } ] ; crate :: Invoice { bindle_version : crate :: BINDLE_VERSION_1 . to_owned ( ) , yanked : None , annotations : None , bindle : crate :: BindleSpec { id : " " . parse ( ) . unwrap ( ) , description : Some ( " " . to_owned ( ) ) , authors : Some ( vec ! [ " " to_owned ( ) ] ) , } , parcel : Some ( labels . iter ( ) . map ( | l | crate :: Parcel { label : l . clone ( ) , conditions : None , } ) . collect ( ) , ) , group : None , } }
Creates a fake invoice for use in testing
Creates a fake invoice for use in testing