use super::*;
use fake::faker::filesystem::raw::FilePath;
use fake::locales::EN;
use fake::Fake;
use std::path::PathBuf;
#[test]
fn thot_dir_of_should_work() {
let base_path = FilePath(EN).fake::<String>();
let base_path = PathBuf::from(base_path);
let expected = base_path.join(THOT_DIR);
let path = thot_dir_of(&base_path);
assert_eq!(expected, path, "path should be correct");
}
#[test]
fn project_file_of_should_work() {
let base_path = FilePath(EN).fake::<String>();
let base_path = PathBuf::from(base_path);
let expected = base_path.join(THOT_DIR).join(PROJECT_FILE);
let path = project_file_of(&base_path);
assert_eq!(expected, path, "path should be correct");
}
#[test]
fn project_settings_file_of_should_work() {
let base_path = FilePath(EN).fake::<String>();
let base_path = PathBuf::from(base_path);
let expected = base_path.join(THOT_DIR).join(PROJECT_SETTINGS_FILE);
let path = project_settings_file_of(&base_path);
assert_eq!(expected, path, "path should be correct");
}
#[test]
fn container_file_of_should_work() {
let base_path = FilePath(EN).fake::<String>();
let base_path = PathBuf::from(base_path);
let expected = base_path.join(THOT_DIR).join(CONTAINER_FILE);
let path = container_file_of(&base_path);
assert_eq!(expected, path, "path should be correct");
}
#[test]
fn container_settings_file_of_should_work() {
let base_path = FilePath(EN).fake::<String>();
let base_path = PathBuf::from(base_path);
let expected = base_path.join(THOT_DIR).join(CONTAINER_SETTINGS_FILE);
let path = container_settings_file_of(&base_path);
assert_eq!(expected, path, "path should be correct");
}
#[test]
fn assets_file_of_should_work() {
let base_path = FilePath(EN).fake::<String>();
let base_path = PathBuf::from(base_path);
let expected = base_path.join(THOT_DIR).join(ASSETS_FILE);
let path = assets_file_of(&base_path);
assert_eq!(expected, path, "path should be correct");
}
#[test]
fn scripts_file_of_should_work() {
let base_path = FilePath(EN).fake::<String>();
let base_path = PathBuf::from(base_path);
let expected = base_path.join(THOT_DIR).join(SCRIPTS_FILE);
let path = scripts_file_of(&base_path);
assert_eq!(expected, path, "path should be correct");
}