|
|
@@ -194,7 +194,7 @@ mod tests { |
|
|
|
#[test] |
|
|
|
fn can_find_valid_language_in_page() { |
|
|
|
let mut config = Config::default(); |
|
|
|
config.languages.push(Language { code: String::from("fr"), rss: false }); |
|
|
|
config.languages.push(Language { code: String::from("fr"), rss: false, search: false }); |
|
|
|
let mut file = FileInfo::new_page( |
|
|
|
&Path::new("/home/vincent/code/site/content/posts/tutorials/python.fr.md"), |
|
|
|
&PathBuf::new(), |
|
|
@@ -207,7 +207,7 @@ mod tests { |
|
|
|
#[test] |
|
|
|
fn can_find_valid_language_in_page_with_assets() { |
|
|
|
let mut config = Config::default(); |
|
|
|
config.languages.push(Language { code: String::from("fr"), rss: false }); |
|
|
|
config.languages.push(Language { code: String::from("fr"), rss: false, search: false }); |
|
|
|
let mut file = FileInfo::new_page( |
|
|
|
&Path::new("/home/vincent/code/site/content/posts/tutorials/python/index.fr.md"), |
|
|
|
&PathBuf::new(), |
|
|
@@ -233,7 +233,7 @@ mod tests { |
|
|
|
#[test] |
|
|
|
fn errors_on_unknown_language_in_page_with_i18n_on() { |
|
|
|
let mut config = Config::default(); |
|
|
|
config.languages.push(Language { code: String::from("it"), rss: false }); |
|
|
|
config.languages.push(Language { code: String::from("it"), rss: false, search: false }); |
|
|
|
let mut file = FileInfo::new_page( |
|
|
|
&Path::new("/home/vincent/code/site/content/posts/tutorials/python.fr.md"), |
|
|
|
&PathBuf::new(), |
|
|
@@ -245,7 +245,7 @@ mod tests { |
|
|
|
#[test] |
|
|
|
fn can_find_valid_language_in_section() { |
|
|
|
let mut config = Config::default(); |
|
|
|
config.languages.push(Language { code: String::from("fr"), rss: false }); |
|
|
|
config.languages.push(Language { code: String::from("fr"), rss: false, search: false }); |
|
|
|
let mut file = FileInfo::new_section( |
|
|
|
&Path::new("/home/vincent/code/site/content/posts/tutorials/_index.fr.md"), |
|
|
|
&PathBuf::new(), |
|
|
|