mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-01-25 19:36:04 +00:00
clippy
This commit is contained in:
parent
6123659711
commit
ec74669c51
2 changed files with 4 additions and 15 deletions
|
@ -78,29 +78,18 @@ mod tests {
|
||||||
instance::Instance,
|
instance::Instance,
|
||||||
local_user::{LocalUser, LocalUserInsertForm},
|
local_user::{LocalUser, LocalUserInsertForm},
|
||||||
person::{Person, PersonInsertForm},
|
person::{Person, PersonInsertForm},
|
||||||
secret::Secret,
|
|
||||||
},
|
},
|
||||||
traits::Crud,
|
traits::Crud,
|
||||||
utils::build_db_pool_for_tests,
|
|
||||||
};
|
};
|
||||||
use lemmy_utils::{error::LemmyResult, rate_limit::RateLimitCell};
|
use lemmy_utils::error::LemmyResult;
|
||||||
use pretty_assertions::assert_eq;
|
use pretty_assertions::assert_eq;
|
||||||
use reqwest::Client;
|
|
||||||
use reqwest_middleware::ClientBuilder;
|
|
||||||
use serial_test::serial;
|
use serial_test::serial;
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
#[serial]
|
#[serial]
|
||||||
async fn test_should_not_validate_user_token_after_password_change() -> LemmyResult<()> {
|
async fn test_should_not_validate_user_token_after_password_change() -> LemmyResult<()> {
|
||||||
let pool_ = build_db_pool_for_tests();
|
let context = LemmyContext::init_test_context().await;
|
||||||
let pool = &mut (&pool_).into();
|
let pool = &mut context.pool();
|
||||||
let secret = Secret::init(pool).await?;
|
|
||||||
let context = LemmyContext::create(
|
|
||||||
pool_.clone(),
|
|
||||||
ClientBuilder::new(Client::default()).build(),
|
|
||||||
secret,
|
|
||||||
RateLimitCell::with_test_config(),
|
|
||||||
);
|
|
||||||
|
|
||||||
let inserted_instance = Instance::read_or_create(pool, "my_domain.tld".to_string()).await?;
|
let inserted_instance = Instance::read_or_create(pool, "my_domain.tld".to_string()).await?;
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,7 @@ pub async fn do_upload_image(
|
||||||
let pictrs = context.settings().pictrs()?;
|
let pictrs = context.settings().pictrs()?;
|
||||||
let image_url = format!("{}image", pictrs.url);
|
let image_url = format!("{}image", pictrs.url);
|
||||||
|
|
||||||
let mut client_req = adapt_request(&req, image_url, &context);
|
let mut client_req = adapt_request(&req, image_url, context);
|
||||||
|
|
||||||
client_req = match upload_type {
|
client_req = match upload_type {
|
||||||
Avatar => {
|
Avatar => {
|
||||||
|
|
Loading…
Reference in a new issue