revert: chore: Remove logic for the disabled option from modul… (#489)

This reverts commit 6c6e0ef1dd.
This commit is contained in:
Matan Kushner
2019-10-05 19:03:48 +09:00
committed by GitHub
parent 04512a66d9
commit f2e20bbea2
3 changed files with 26 additions and 2 deletions
+18 -2
View File
@@ -11,8 +11,13 @@ should not display when disabled, should display *something* when enabled,
and should have the correct prefixes and suffixes in a given config */
#[test]
fn config_default() -> io::Result<()> {
let output = common::render_module("time").output()?;
fn config_enabled() -> io::Result<()> {
let output = common::render_module("time")
.use_config(toml::toml! {
[time]
disabled = false
})
.output()?;
let actual = String::from_utf8(output.stdout).unwrap();
// We can't test what it actually is...but we can assert it's not blank
@@ -20,11 +25,22 @@ fn config_default() -> io::Result<()> {
Ok(())
}
#[test]
fn config_blank() -> io::Result<()> {
let output = common::render_module("time").output()?;
let actual = String::from_utf8(output.stdout).unwrap();
let expected = "";
assert_eq!(expected, actual);
Ok(())
}
#[test]
fn config_check_prefix_and_suffix() -> io::Result<()> {
let output = common::render_module("time")
.use_config(toml::toml! {
[time]
disabled = false
format = "[%T]"
})
.output()?;