File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
test/unit/migrations/settings Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -81,5 +81,51 @@ module(
8181
8282 assert . deepEqual ( Array . from ( result ) , Array . from ( expectedResult ) ) ;
8383 } ) ;
84+
85+ test ( "migrate empty settings" , function ( assert ) {
86+ const settings = new Map ( Object . entries ( { } ) ) ;
87+ const result = migrate ( settings ) ;
88+ assert . deepEqual ( Array . from ( result ) , Array . from ( settings ) ) ;
89+ } ) ;
90+
91+ test ( "migrate same settings" , function ( assert ) {
92+ const settings = new Map (
93+ Object . entries ( {
94+ header_links : [
95+ {
96+ icon : "fab-facebook" ,
97+ title : "Desktop and mobile link" ,
98+ url : "https://facebook.com" ,
99+ view : "vdm" ,
100+ target : "blank" ,
101+ } ,
102+ {
103+ icon : "fab-twitter" ,
104+ title : "Mobile-only link" ,
105+ url : "https://twitter.com" ,
106+ view : "vmo" ,
107+ target : "blank" ,
108+ } ,
109+ {
110+ icon : "fab-gear" ,
111+ title : "More settings" ,
112+ url : "https://example.com" ,
113+ view : "vmo" ,
114+ target : "blank" ,
115+ } ,
116+ {
117+ icon : "user-group" ,
118+ title : "Groups" ,
119+ url : "https://example.com" ,
120+ view : "vmo" ,
121+ target : "blank" ,
122+ } ,
123+ ] ,
124+ svg_icons : "fab-facebook|fab-twitter|fab-gear|user-group" ,
125+ } )
126+ ) ;
127+ const result = migrate ( settings ) ;
128+ assert . deepEqual ( Array . from ( result ) , Array . from ( settings ) ) ;
129+ } ) ;
84130 }
85131) ;
You can’t perform that action at this time.
0 commit comments