Skip to content

Commit 3b74a2c

Browse files
used the test::repo_init() helper method instead
1 parent e71b65a commit 3b74a2c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/repo.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -3624,16 +3624,14 @@ mod tests {
36243624

36253625
#[test]
36263626
fn smoke_config_write_and_read() {
3627-
let td = TempDir::new().unwrap();
3628-
let path = td.path();
3629-
3630-
let repo = Repository::init(path).unwrap();
3627+
let (td, repo) = crate::test::repo_init();
36313628

36323629
let mut config = repo.config().unwrap();
36333630

36343631
config.set_bool("commit.gpgsign", false).unwrap();
36353632

3636-
let c = fs::read_to_string(path.join(".git").join("config")).unwrap();
3633+
let c = fs::read_to_string(td.path().join(".git").join("config"))
3634+
.unwrap();
36373635

36383636
assert!(c.contains("[commit]"));
36393637
assert!(c.contains("gpgsign = false"));

0 commit comments

Comments
 (0)