File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1720,6 +1720,8 @@ mod tests {
17201720 assert ! ( model. fields. is_empty( ) ) ;
17211721 }
17221722
1723+ // Field removal: covered by `remove_field_drops_entry`; other tests focus on modal edits and group reassignment.
1724+
17231725 #[ test]
17241726 fn modal_save_updates_field ( ) {
17251727 let mut model = ExtraFieldsModel :: default ( ) ;
@@ -2057,38 +2059,4 @@ mod tests {
20572059 . id ;
20582060 assert_eq ! ( model. fields[ 0 ] . group_id, Some ( default_id) ) ;
20592061 }
2060-
2061- #[ test]
2062- fn remove_field_updates_model ( ) {
2063- let mut model = ExtraFieldsModel :: default ( ) ;
2064- let mut cmds = Vec :: new ( ) ;
2065- update (
2066- & mut model,
2067- ExtraFieldsMsg :: ImportLoaded {
2068- fields : vec ! [ ExtraField {
2069- label: "One" . into( ) ,
2070- kind: ExtraFieldKind :: Text ,
2071- value: "a" . into( ) ,
2072- value_multi: Vec :: new( ) ,
2073- options: vec![ ] ,
2074- unit: None ,
2075- units: vec![ ] ,
2076- position: None ,
2077- required: false ,
2078- description: None ,
2079- allow_multi_values: false ,
2080- blank_value_on_duplicate: false ,
2081- group_id: None ,
2082- readonly: false ,
2083- } ] ,
2084- groups : vec ! [ ] ,
2085- source : PathBuf :: from ( "sample.json" ) ,
2086- } ,
2087- & mut cmds,
2088- ) ;
2089-
2090- assert_eq ! ( model. fields. len( ) , 1 ) ;
2091- let _ = update ( & mut model, ExtraFieldsMsg :: RemoveField ( 0 ) , & mut Vec :: new ( ) ) ;
2092- assert ! ( model. fields. is_empty( ) ) ;
2093- }
20942062}
You can’t perform that action at this time.
0 commit comments