use super::RULE;

#[test]
fn fix_adds_optional_flag() {
    let bad = "$record | get $key";
    RULE.assert_fixed_contains(bad, " -o");
}

#[test]
fn fix_adds_optional_flag_in_pipeline() {
    let bad = "$servers | get $name";
    RULE.assert_fixed_contains(bad, " -o");
}

#[test]
fn fix_explanation_mentions_optional() {
    let bad = "$data | get $field";
    RULE.assert_fix_explanation_contains(bad, "optional");
}
