Skip to content

Commit

Permalink
Move section_deserialization to unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
FedericoPonzi committed Nov 2, 2024
1 parent 49ef2f1 commit c3567f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 35 deletions.
13 changes: 11 additions & 2 deletions horust/src/horust/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ mod test {
use std::io;
use std::path::{Path, PathBuf};

use tempdir::TempDir;

use crate::horust::fetch_services;
use crate::horust::formats::Service;
use crate::Horust;
use tempdir::TempDir;

const FIRST_SERVICE_FILENAME: &str = "my-first-service.toml";
const SECOND_SERVICE_FILENAME: &str = "my-second-service.toml";
Expand Down Expand Up @@ -234,4 +234,13 @@ mod test {

Ok(())
}

#[test]
fn test_should_deserialize() {
let base = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
let services_path = base.join("../example_services/");
let services = list_files(&services_path).unwrap().len();
let horust = Horust::from_services_dirs(&[services_path]).unwrap();
assert_eq!(horust.services.len(), services);
}
}
33 changes: 0 additions & 33 deletions horust/tests/service_deserialization.rs

This file was deleted.

0 comments on commit c3567f4

Please sign in to comment.