File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1982,40 +1982,7 @@ mod tests {
19821982 }
19831983
19841984 #[ test]
1985- fn removing_last_group_recreates_default_and_reassigns ( ) {
1986- let mut model = ExtraFieldsModel :: default ( ) ;
1987- model. groups . push ( ExtraFieldGroup {
1988- id : 5 ,
1989- name : "Only" . into ( ) ,
1990- position : 0 ,
1991- } ) ;
1992- model. fields . push ( ExtraField {
1993- label : "F" . into ( ) ,
1994- kind : ExtraFieldKind :: Text ,
1995- value : "v" . into ( ) ,
1996- value_multi : Vec :: new ( ) ,
1997- options : vec ! [ ] ,
1998- unit : None ,
1999- units : vec ! [ ] ,
2000- position : None ,
2001- required : false ,
2002- description : None ,
2003- allow_multi_values : false ,
2004- blank_value_on_duplicate : false ,
2005- group_id : Some ( 5 ) ,
2006- readonly : false ,
2007- } ) ;
2008-
2009- let mut cmds = Vec :: new ( ) ;
2010- let _ = update ( & mut model, ExtraFieldsMsg :: RemoveGroup ( 0 ) , & mut cmds) ;
2011-
2012- assert_eq ! ( model. groups. len( ) , 1 ) ;
2013- assert_eq ! ( model. groups[ 0 ] . name, "Default" ) ;
2014- assert_eq ! ( model. fields[ 0 ] . group_id, Some ( model. groups[ 0 ] . id) ) ;
2015- }
2016-
2017- #[ test]
2018- fn removing_only_group_renames_to_default ( ) {
1985+ fn removing_only_group_renames_to_default_preserves_id ( ) {
20191986 let mut model = ExtraFieldsModel :: default ( ) ;
20201987 model. groups . push ( ExtraFieldGroup {
20211988 id : 7 ,
You can’t perform that action at this time.
0 commit comments