Skip to content

Commit

Permalink
Refactor avm test
Browse files Browse the repository at this point in the history
  • Loading branch information
Aursen committed Jul 21, 2023
1 parent f713619 commit 1c5c763
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions avm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,17 +261,12 @@ mod tests {
dir.push(".anchorversion");
let mut file_created = fs::File::create(&dir).unwrap();
let test_version = "0.26.0";
file_created.write(test_version.as_bytes()).unwrap();

let version = read_anchorversion_file();
match version {
Ok(v) => {
assert_eq!(v.to_string(), test_version);
}
Err(_e) => {
assert!(false);
}
}
file_created.write_all(test_version.as_bytes()).unwrap();

let version = read_anchorversion_file().unwrap();

assert_eq!(version.to_string(), test_version);

fs::remove_file(&dir).unwrap();
}

Expand Down

0 comments on commit 1c5c763

Please sign in to comment.