cargo fixes
This commit is contained in:
+15
-3
@@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user