// Tests for mecha10_cli::handlers::template

use mecha10_cli::handlers::template::*;

#[test]
fn test_template_args() {
    let args = TemplateArgs {
        action: TemplateAction::List,
        category: Some("drivers".to_string()),
    };

    assert_eq!(args.action, TemplateAction::List);
    assert_eq!(args.category, Some("drivers".to_string()));
}

#[test]
fn test_template_action_from_str() {
    assert_eq!(TemplateAction::from_str("list"), Some(TemplateAction::List));
    assert_eq!(TemplateAction::from_str("info"), Some(TemplateAction::Info));
    assert_eq!(TemplateAction::from_str("invalid"), None);
}
