fix media tests for URL previews

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-02-10 11:02:40 -05:00 committed by June
parent c0dd5b1cc2
commit fb2eba722d

View file

@ -372,12 +372,32 @@ mod tests {
) -> Result<(Option<String>, Option<String>, Vec<u8>)> {
todo!()
}
fn remove_url_preview(&self, _url: &str) -> Result<()> {
todo!()
}
fn set_url_preview(
&self,
_url: &str,
_data: &UrlPreviewData,
_timestamp: std::time::Duration,
) -> Result<()> {
todo!()
}
fn get_url_preview(&self, _url: &str) -> Option<UrlPreviewData> {
todo!()
}
}
#[tokio::test]
async fn long_file_names_works() {
static DB: MockedKVDatabase = MockedKVDatabase;
let media = Service { db: &DB };
let media = Service {
db: &DB,
url_preview_mutex: RwLock::new(HashMap::new()),
};
let mxc = "mxc://example.com/ascERGshawAWawugaAcauga".to_owned();
let width = 100;