11use anyhow:: Result ;
22use gix:: { open, Repository , ThreadSafeRepository } ;
33use onefetch:: cli:: { CliOptions , InfoCliOptions , TextFormattingCliOptions } ;
4+ use onefetch:: config:: ConfigOptions ;
45use onefetch:: info:: { build_info, get_work_dir} ;
56
67fn repo ( name : & str ) -> Result < Repository > {
@@ -43,12 +44,13 @@ fn test_repo() -> Result<()> {
4344 ..Default :: default ( )
4445 } ,
4546 text_formatting : TextFormattingCliOptions {
46- iso_time : true ,
47+ iso_time : Some ( true ) ,
4748 ..Default :: default ( )
4849 } ,
4950 ..Default :: default ( )
5051 } ;
51- let info = build_info ( & config) ?;
52+ let toml = ConfigOptions :: default ( ) ;
53+ let info = build_info ( & config, & toml) ?;
5254 insta:: assert_json_snapshot!(
5355 info,
5456 {
@@ -67,7 +69,8 @@ fn test_repo_without_remote() -> Result<()> {
6769 input : repo. path ( ) . to_path_buf ( ) ,
6870 ..Default :: default ( )
6971 } ;
70- let info = build_info ( & config) ;
72+ let toml = ConfigOptions :: default ( ) ;
73+ let info = build_info ( & config, & toml) ;
7174 assert ! ( info. is_ok( ) ) ;
7275
7376 Ok ( ( ) )
@@ -80,7 +83,8 @@ fn test_partial_repo() -> Result<()> {
8083 input : repo. path ( ) . to_path_buf ( ) ,
8184 ..Default :: default ( )
8285 } ;
83- let _info = build_info ( & config) . expect ( "no error" ) ;
86+ let toml = ConfigOptions :: default ( ) ;
87+ let _info = build_info ( & config, & toml) . expect ( "no error" ) ;
8488 Ok ( ( ) )
8589}
8690
@@ -91,6 +95,7 @@ fn test_repo_with_pre_epoch_dates() -> Result<()> {
9195 input : repo. path ( ) . to_path_buf ( ) ,
9296 ..Default :: default ( )
9397 } ;
94- let _info = build_info ( & config) . expect ( "no error" ) ;
98+ let toml = ConfigOptions :: default ( ) ;
99+ let _info = build_info ( & config, & toml) . expect ( "no error" ) ;
95100 Ok ( ( ) )
96101}
0 commit comments