chore: use common repo URL, as specified in src/tests.rs
This commit is contained in:
parent
54c0323105
commit
26fdc1db9f
2 changed files with 5 additions and 3 deletions
|
@ -265,15 +265,17 @@ mod tests {
|
||||||
use git2::Repository;
|
use git2::Repository;
|
||||||
use mktemp::Temp;
|
use mktemp::Temp;
|
||||||
|
|
||||||
|
use crate::tests;
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
async fn pages_works() {
|
async fn pages_works() {
|
||||||
let tmp_dir = Temp::new_dir().unwrap();
|
let tmp_dir = Temp::new_dir().unwrap();
|
||||||
assert!(tmp_dir.exists(), "tmp directory successully created");
|
assert!(tmp_dir.exists(), "tmp directory successully created");
|
||||||
let mut page = Page {
|
let mut page = Page {
|
||||||
secret: String::default(),
|
secret: String::default(),
|
||||||
repo: "https://github.com/mcaptcha/website".to_owned(),
|
repo: tests::REPO_URL.into(),
|
||||||
path: tmp_dir.to_str().unwrap().to_string(),
|
path: tmp_dir.to_str().unwrap().to_string(),
|
||||||
branch: "gh-pages".to_string(),
|
branch: tests::BRANCH.to_string(),
|
||||||
domain: "mcaptcha.org".into(),
|
domain: "mcaptcha.org".into(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ use crate::page::Page;
|
||||||
use crate::settings::Settings;
|
use crate::settings::Settings;
|
||||||
use crate::*;
|
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 const BRANCH: &str = "gh-pages";
|
||||||
|
|
||||||
pub async fn get_ctx() -> (Temp, Arc<Ctx>) {
|
pub async fn get_ctx() -> (Temp, Arc<Ctx>) {
|
||||||
|
|
Loading…
Reference in a new issue