mirror of
https://github.com/Noratrieb/fix-und-fertig.git
synced 2026-01-14 18:55:04 +01:00
STUFF
This commit is contained in:
parent
fb5208f734
commit
d964157bfc
14 changed files with 900 additions and 1 deletions
27
tests/init.rs
Normal file
27
tests/init.rs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
mod helpers;
|
||||
use helpers::*;
|
||||
|
||||
#[test]
|
||||
fn init() {
|
||||
let dir = tmpdir();
|
||||
|
||||
run_in(&dir, ["init"]).unwrap();
|
||||
|
||||
assert!(dir.path().join(".fuf").is_dir());
|
||||
assert!(dir.path().join(".fuf").join("db").is_dir());
|
||||
assert!(dir.path().join(".fuf").join("db").join("objects").is_dir());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn double_init() {
|
||||
let dir = tmpdir();
|
||||
|
||||
run_in(&dir, ["init"]).unwrap();
|
||||
|
||||
assert!(dir.path().join(".fuf").is_dir());
|
||||
assert!(dir.path().join(".fuf").join("db").is_dir());
|
||||
assert!(dir.path().join(".fuf").join("db").join("objects").is_dir());
|
||||
|
||||
|
||||
assert!(run_in(&dir, ["init"]).is_err());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue