diff --git a/src/page.rs b/src/page.rs index 64d8571..934cc97 100644 --- a/src/page.rs +++ b/src/page.rs @@ -265,15 +265,17 @@ mod tests { use git2::Repository; use mktemp::Temp; + use crate::tests; + #[actix_rt::test] async fn pages_works() { let tmp_dir = Temp::new_dir().unwrap(); assert!(tmp_dir.exists(), "tmp directory successully created"); let mut page = Page { secret: String::default(), - repo: "https://github.com/mcaptcha/website".to_owned(), + repo: tests::REPO_URL.into(), path: tmp_dir.to_str().unwrap().to_string(), - branch: "gh-pages".to_string(), + branch: tests::BRANCH.to_string(), domain: "mcaptcha.org".into(), }; diff --git a/src/tests.rs b/src/tests.rs index c7c308c..cdac3aa 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -33,7 +33,7 @@ use crate::page::Page; use crate::settings::Settings; use crate::*; -pub const REPO_URL: &str = "https://github.com/mCaptcha/website/"; +pub const REPO_URL: &str = "http://github.com:8080/mCaptcha/website/"; pub const BRANCH: &str = "gh-pages"; pub async fn get_ctx() -> (Temp, Arc) {