mirror of
https://github.com/coastalwhite/lemurs
synced 2024-11-23 02:23:07 +00:00
Fix input field test
This commit is contained in:
parent
410dc53db9
commit
73db1236c7
1 changed files with 3 additions and 2 deletions
|
@ -221,11 +221,12 @@ impl InputFieldWidget {
|
|||
mod tests {
|
||||
use super::*;
|
||||
use InputFieldDisplayType::*;
|
||||
use crate::config::Config;
|
||||
|
||||
#[test]
|
||||
fn cursor_movement() {
|
||||
// TODO: Verify Unicode behaviour
|
||||
let mut input_field = InputFieldWidget::new("", Echo);
|
||||
let mut input_field = InputFieldWidget::new(Echo, Config::default().username_field);
|
||||
assert_eq!(input_field.cursor, 0);
|
||||
input_field.insert('x');
|
||||
assert_eq!(input_field.cursor, 1);
|
||||
|
@ -255,7 +256,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn integration() {
|
||||
let mut input_field = InputFieldWidget::new("", Echo);
|
||||
let mut input_field = InputFieldWidget::new(Echo, Config::default().username_field);
|
||||
assert_eq!(&input_field.show_string(), "");
|
||||
input_field.backspace();
|
||||
assert_eq!(&input_field.show_string(), "");
|
||||
|
|
Loading…
Reference in a new issue