Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
926 changes: 915 additions & 11 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion crates/core/src/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct Entry {
/// Every other spelling the service gives of the title.
pub spellings: Vec<String>,
/// What kind of release the work is, and none where the service does
/// not say.
/// not say or names one this build does not know.
pub format: Option<Format>,
/// How many episodes the work has, and none where the service holds no
/// count.
Expand Down
24 changes: 16 additions & 8 deletions crates/store/src/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,11 @@ mod tests {
#[test]
fn a_list_filed_is_listed_as_it_was_filed() {
let (_home, mut store) = a_store();
let list = [a_series(21, "Show Title"), a_film(437), a_work_to_come(9)];
let list = [
a_series(21, "Show Title"),
a_film(112_151),
a_work_to_come(9),
];

store.file(BACKEND, &list).expect("the list is filed");

Expand Down Expand Up @@ -333,7 +337,7 @@ mod tests {
// entry's.
let (_home, mut store) = a_store();
store
.file(BACKEND, &[a_series(21, "Show Title"), a_film(437)])
.file(BACKEND, &[a_series(21, "Show Title"), a_film(112_151)])
.expect("the list is filed");

store
Expand All @@ -356,7 +360,7 @@ mod tests {
[
Value::Integer(2),
Value::Text(BACKEND.to_owned()),
Value::Integer(437)
Value::Integer(112_151)
],
]
);
Expand All @@ -366,7 +370,7 @@ mod tests {
#[test]
fn an_entry_that_comes_back_to_the_list_is_the_show_it_was() {
let (_home, mut store) = a_store();
let list = [a_series(21, "Show Title"), a_film(437)];
let list = [a_series(21, "Show Title"), a_film(112_151)];
store.file(BACKEND, &list).expect("the list is filed");
let first = store.listed(BACKEND).expect("the list is read");
store
Expand All @@ -384,7 +388,11 @@ mod tests {
#[test]
fn filing_the_same_list_twice_changes_nothing() {
let (_home, mut store) = a_store();
let list = [a_series(21, "Show Title"), a_film(437), a_work_to_come(9)];
let list = [
a_series(21, "Show Title"),
a_film(112_151),
a_work_to_come(9),
];
store.file(BACKEND, &list).expect("the list is filed");
let once = every_row(&store);

Expand Down Expand Up @@ -493,7 +501,7 @@ mod tests {
.expect("the list is filed");
let before = every_row(&store);

let refused = store.file(BACKEND, &[a_film(437), a_film(437)]);
let refused = store.file(BACKEND, &[a_film(112_151), a_film(112_151)]);

assert!(
matches!(
Expand All @@ -511,14 +519,14 @@ mod tests {
let (_home, mut store) = a_store();

store
.file(BACKEND, &[a_film(437)])
.file(BACKEND, &[a_film(112_151)])
.expect("the list is filed");

assert_eq!(
rows(&store, "list_entries"),
[[
Value::Text(BACKEND.to_owned()),
Value::Integer(437),
Value::Integer(112_151),
Value::Text("[]".to_owned()),
Value::Text("film".to_owned()),
Value::Integer(1),
Expand Down
6 changes: 5 additions & 1 deletion crates/sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ repository.workspace = true

[dependencies]
benshi-core = { path = "../core" }
reqwest = { version = "0.13.4", default-features = false, features = ["rustls-no-provider"] }
rustls = { version = "0.23.43", default-features = false, features = ["ring", "std", "tls12"] }
serde = { version = "1.0.229", features = ["derive"] }
serde_json = "1.0.151"
thiserror = "2.0.21"
tokio = { version = "1.53.1", features = ["time"] }

[lints]
workspace = true

[dev-dependencies]
tokio = { version = "1.53.1", features = ["macros", "rt", "test-util", "time"] }
tokio = { version = "1.53.1", features = ["io-util", "macros", "net", "rt", "test-util", "time"] }
Loading
Loading