cargo fixes

This commit is contained in:
2024-10-25 00:41:46 +02:00
parent 1d8a70768f
commit 957c5b91bc
7 changed files with 49 additions and 27 deletions
+15 -3
View File
@@ -1,4 +1,4 @@
use crate::config::{Config, GiteaConfig, GitlabConfig};
use crate::config::{Config, GiteaConfig};
use crate::error::GeneralError;
use reqwest::header::{HeaderMap, ACCEPT, AUTHORIZATION};
use reqwest::{ClientBuilder, StatusCode};
@@ -92,7 +92,19 @@ mod test {
token: "<PASSWORD>".into(),
};
assert_eq!(is_client_for_url(&Url::parse("https://gitea.champs-libres.be/something/somewhere").unwrap(), &config), true);
assert_eq!(is_client_for_url(&Url::parse("https://somewhere.else/something/somewhere").unwrap(), &config), false);
assert_eq!(
is_client_for_url(
&Url::parse("https://gitea.champs-libres.be/something/somewhere").unwrap(),
&config
),
true
);
assert_eq!(
is_client_for_url(
&Url::parse("https://somewhere.else/something/somewhere").unwrap(),
&config
),
false
);
}
}