From 26fdc1db9f1ae949c76f44cf436129b392cb9d2e Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Sun, 27 Nov 2022 21:07:05 +0530 Subject: [PATCH] chore: use common repo URL, as specified in src/tests.rs --- src/page.rs | 6 ++++-- src/tests.rs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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) {