Skip to content

Commit

Permalink
Remove test temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelmello committed Dec 27, 2023
1 parent 0874a7a commit fad1b84
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions inquire/src/prompts/dateselect/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,3 @@ fn closure_validator() {

assert_eq!(today_date.pred_opt().unwrap(), ans);
}

#[test]
/// Tests the behaviour of several keybindings in a admittedly naive way.
fn naive_keybinding_checks() {
let mut backend = fake_backend(vec![Key::Enter, Key::Left(KeyModifiers::NONE), Key::Enter]);

let today_date = get_current_date();

let validator = move |d| {
if today_date > d {
Ok(Validation::Valid)
} else {
Ok(Validation::Invalid("Date must be in the past".into()))
}
};

let ans = DateSelect::new("Question")
.with_validator(validator)
.prompt_with_backend(&mut backend)
.unwrap();

assert_eq!(today_date.pred_opt().unwrap(), ans);
}

0 comments on commit fad1b84

Please sign in to comment.