aboutsummaryrefslogtreecommitdiff
path: root/src/command/help.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/help.rs')
-rw-r--r--src/command/help.rs47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/command/help.rs b/src/command/help.rs
index b682fc0..da5831c 100644
--- a/src/command/help.rs
+++ b/src/command/help.rs
@@ -38,3 +38,50 @@ impl super::Command for Help {
"\t\t\t\tPrints this help"
}
}
+
+#[cfg(test)]
+mod tests {
+
+ use super::*;
+ use crate::command::Command;
+ use crate::configuration::Configuration;
+
+ #[test]
+ fn test_add_command() {
+ let help = Help::new();
+
+ let configuration = Configuration::new();
+ help.execute(None, &configuration, "")
+ .expect("Could not call help");
+ }
+
+ #[test]
+ fn help_before_dependencies() {
+ let help = Help::new();
+ let dependencies = help.before_dependencies();
+
+ assert_eq!(dependencies.len(), 0);
+ }
+
+ #[test]
+ fn help_after_dependencies() {
+ let help = Help::new();
+ let dependencies = help.after_dependencies();
+
+ assert_eq!(dependencies.len(), 0);
+ }
+
+ // These two tests feel pointless but I'm doing it for the coverage :p
+
+ #[test]
+ fn help_command_output() {
+ let help = Help::new();
+ help.command();
+ }
+
+ #[test]
+ fn help_help_output() {
+ let help = Help::new();
+ help.help();
+ }
+}