Skip to content

Commit

Permalink
Use max_elements in database tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vruello committed Oct 26, 2024
1 parent 7aea085 commit 780e8d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion common/src/database/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ pub mod tests {
assert_eq!(toto.revision(), None);
assert_eq!(toto.data_locale(), None);
assert_eq!(toto.locale(), None);
assert_eq!(toto.max_elements(), None);

let toto2 = db.get_subscription_by_identifier("toto").await?.unwrap();
assert_eq!(toto, &toto2);
Expand Down Expand Up @@ -211,7 +212,8 @@ pub mod tests {
])
.set_revision(Some("1472".to_string()))
.set_locale(Some("fr-FR".to_string()))
.set_data_locale(Some("en-US".to_string()));
.set_data_locale(Some("en-US".to_string()))
.set_max_elements(Some(10));
db.store_subscription(&subscription2).await?;

assert!(db.get_subscriptions().await?.len() == 2);
Expand Down Expand Up @@ -256,6 +258,7 @@ pub mod tests {
assert_eq!(tata.revision(), Some("1472".to_string()).as_ref());
assert_eq!(tata.locale(), Some("fr-FR".to_string()).as_ref());
assert_eq!(tata.data_locale(), Some("en-US".to_string()).as_ref());
assert_eq!(tata.max_elements(), Some(10));

let tata_save = tata.clone();
tata.set_name("titi".to_string())
Expand Down

0 comments on commit 780e8d2

Please sign in to comment.