@@ -42,36 +42,35 @@ pub async fn group_poke(config: &AppConfig, group_id: u64, to: u64) {
4242#[ cfg( test) ]
4343mod tests {
4444 use super :: * ;
45- use crate :: config:: load_config;
4645
4746 #[ tokio:: test]
4847 #[ ignore = "Requires an API server in internal network" ]
4948 async fn test_private_poke ( ) {
50- let config = load_config ( ) . expect ( "Failed to load config" ) ;
49+ let config = AppConfig :: init ( ) . expect ( "Failed to load config" ) ;
5150 println ! ( "Loaded config" ) ;
5251 private_poke ( & config, 46595749 , false ) . await ;
5352 }
5453
5554 #[ tokio:: test]
5655 #[ ignore = "Requires an API server in internal network" ]
5756 async fn test_private_self_poke ( ) {
58- let config = load_config ( ) . expect ( "Failed to load config" ) ;
57+ let config = AppConfig :: init ( ) . expect ( "Failed to load config" ) ;
5958 println ! ( "Loaded config" ) ;
6059 private_poke ( & config, 46595749 , true ) . await ;
6160 }
6261
6362 #[ tokio:: test]
6463 #[ ignore = "Requires an API server in internal network" ]
6564 async fn test_group_poke ( ) {
66- let config = load_config ( ) . expect ( "Failed to load config" ) ;
65+ let config = AppConfig :: init ( ) . expect ( "Failed to load config" ) ;
6766 println ! ( "Loaded config" ) ;
6867 group_poke ( & config, 738943282 , 46595749 ) . await ;
6968 }
7069
7170 #[ tokio:: test]
7271 #[ ignore = "Requires an API server in internal network" ]
7372 async fn test_group_self_poke ( ) {
74- let config = load_config ( ) . expect ( "Failed to load config" ) ;
73+ let config = AppConfig :: init ( ) . expect ( "Failed to load config" ) ;
7574 println ! ( "Loaded config" ) ;
7675 group_poke ( & config, 738943282 , config. botcat_capoo . id ) . await ;
7776 }
0 commit comments