diff --git a/crates/libbui/src/sample/mod.rs b/crates/libbui/src/sample/mod.rs index 771cc42..dcf5124 100644 --- a/crates/libbui/src/sample/mod.rs +++ b/crates/libbui/src/sample/mod.rs @@ -547,6 +547,14 @@ impl Api for SampleApi { }) } + async fn tags(&self) -> libby::Result { + let _state = self.linked()?; + Ok(libby::models::TagSummary { + tags: Vec::new(), + extra: Default::default(), + }) + } + async fn cover_bytes(&self, url: &Url) -> libby::Result> { Ok(cover::render(url)) } @@ -598,6 +606,14 @@ mod tests { ); } + #[tokio::test] + async fn tag_summary_is_empty_and_requires_a_linked_account() { + let api = api(); + assert!(api.tags().await.unwrap().tags.is_empty()); + api.sign_out(); + assert!(matches!(api.tags().await, Err(libby::Error::Unlinked))); + } + #[tokio::test] async fn search_matches_every_word_and_pages() { let api = api();