Compare commits

...

2 Commits

Author SHA1 Message Date
Dessalines 6cdb4dfc86 Fix test. 2024-05-08 22:30:24 -04:00
Dessalines e5f9a3e966 Fixing imports. 2024-05-08 21:03:33 -04:00
2 changed files with 6 additions and 2 deletions

View File

@ -1128,10 +1128,13 @@ mod tests {
"https://lemmy-alpha/api/v3/image_proxy?url=http%3A%2F%2Flemmy-beta%2Fimage.png",
proxied.as_str()
);
// This fails, because the details can't be fetched without pictrs running,
// And a remote image won't be inserted.
assert!(
RemoteImage::validate(&mut context.pool(), remote_image.into())
.await
.is_ok()
.is_err()
);
}

View File

@ -12,11 +12,12 @@ use crate::{
utils::{get_conn, DbPool},
};
use diesel::{
dsl::exists,
insert_into,
result::Error,
select,
ExpressionMethods,
NotFound,
OptionalExtension,
QueryDsl,
};
use diesel_async::{AsyncPgConnection, RunQueryDsl};