File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ impl LocalesDatabase {
5959 #[ cfg( test) ]
6060 pub fn with_entries ( data : & [ LocaleEntry ] ) -> Self {
6161 Self {
62- known_locales : vec ! [ ] ,
62+ known_locales : data . iter ( ) . map ( |l| l . id . clone ( ) ) . collect ( ) ,
6363 locales : data. to_vec ( ) ,
6464 }
6565 }
Original file line number Diff line number Diff line change @@ -89,10 +89,11 @@ impl Service {
8989 ) -> Service {
9090 let system = SystemInfo :: read_from ( & model) ;
9191 let config = ExtendedConfig :: new_from ( & system) ;
92+ let proposal = ( & config) . into ( ) ;
9293 let state = State {
9394 system,
9495 config,
95- proposal : None ,
96+ proposal : Some ( proposal ) ,
9697 } ;
9798
9899 Self {
Original file line number Diff line number Diff line change @@ -172,6 +172,9 @@ mod tests {
172172 let updated = handler. call ( message:: GetConfig ) . await ?;
173173 assert_eq ! ( & updated, & input_config) ;
174174
175+ let proposal = handler. call ( message:: GetProposal ) . await ?;
176+ assert ! ( proposal. is_some( ) ) ;
177+
175178 let event = events_rx. recv ( ) . await . expect ( "Did not receive the event" ) ;
176179 assert ! ( matches!( event, Event :: ProposalChanged ) ) ;
177180 Ok ( ( ) )
@@ -226,6 +229,9 @@ mod tests {
226229 let found_issues = issues. call ( issue:: message:: Get ) . await ?;
227230 let l10n_issues = found_issues. get ( "localization" ) . unwrap ( ) ;
228231 assert_eq ! ( l10n_issues. len( ) , 3 ) ;
232+
233+ let proposal = handler. call ( message:: GetProposal ) . await ?;
234+ assert ! ( proposal. is_none( ) ) ;
229235 Ok ( ( ) )
230236 }
231237
You can’t perform that action at this time.
0 commit comments