chore: use common repo URL, as specified in src/tests.rs

This commit is contained in:
Aravinth Manivannan 2022-11-27 21:07:05 +05:30
parent 54c0323105
commit 26fdc1db9f
Signed by: realaravinth
GPG key ID: AD9F0F08E855ED88
2 changed files with 5 additions and 3 deletions

View file

@ -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(),
};

View file

@ -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<Ctx>) {