Skip to content

Commit

Permalink
make tests work without feature date
Browse files Browse the repository at this point in the history
  • Loading branch information
deadbaed committed Jul 31, 2024
1 parent cb6bb95 commit b63195e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ mod test {
use crate::{
error::ReadError, metadata::Metadata, Algorithm, BagIt, ChecksumAlgorithm, Payload,
};
#[cfg(feature = "date")]
use jiff::civil::Date;
use md5::Md5;
use sha2::Sha256;
Expand Down Expand Up @@ -238,7 +239,13 @@ mod test {
],
algo.algorithm(),
vec![
#[cfg(feature = "date")]
Metadata::BaggingDate(Date::new(2024, 7, 11).unwrap()),
#[cfg(not(feature = "date"))]
Metadata::Custom {
key: "Bagging-Date".into(),
value: "2024-07-11".into(),
},
Metadata::PayloadOctetStreamSummary {
octet_count: 85766,
stream_count: 5,
Expand Down

0 comments on commit b63195e

Please sign in to comment.