diff options
Diffstat (limited to 'src/command/status/mod.rs')
| -rw-r--r-- | src/command/status/mod.rs | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/command/status/mod.rs b/src/command/status/mod.rs index 3bad923..5b547bb 100644 --- a/src/command/status/mod.rs +++ b/src/command/status/mod.rs @@ -41,3 +41,51 @@ impl super::Command for Status { fn available_status_providers() -> Vec<fn(&Configuration) -> Result<String>> { vec![configuration_status::status, blog_status::status] } + +#[cfg(test)] +mod tests { + + use super::*; + use crate::command::Command; + use crate::configuration::Configuration; + + #[test] + fn test_status_command() { + let status = Status::new(); + + let configuration = Configuration::new().unwrap(); + status + .execute(None, &configuration, "") + .expect("Could not call status"); + } + + #[test] + fn status_before_dependencies() { + let status = Status::new(); + let dependencies = status.before_dependencies(); + + assert_eq!(dependencies.len(), 0); + } + + #[test] + fn status_after_dependencies() { + let status = Status::new(); + let dependencies = status.after_dependencies(); + + assert_eq!(dependencies.len(), 0); + } + + // These two tests feel pointless but I'm doing it for the coverage :p + + #[test] + fn status_command_output() { + let status = Status::new(); + status.command(); + } + + #[test] + fn status_help_output() { + let status = Status::new(); + status.help(); + } +} |