add contents in the acceptance test
This commit is contained in:
parent
c68b6295a6
commit
2fc1a2fc9c
1 changed files with 5 additions and 3 deletions
|
@ -37,13 +37,15 @@ mod rustback {
|
||||||
use tempfile::tempfile_in;
|
use tempfile::tempfile_in;
|
||||||
use tempfile::TempDir;
|
use tempfile::TempDir;
|
||||||
use dir_diff::is_different;
|
use dir_diff::is_different;
|
||||||
|
use std::fs::write;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn be_able_to_restore_backed_up_files() -> Result<(), Error> {
|
fn be_able_to_restore_backed_up_files() -> Result<(), Error> {
|
||||||
let source = tempdir()?;
|
let source = tempdir()?;
|
||||||
File::create(source.path().join("first"))?;
|
|
||||||
File::create(source.path().join("second"))?;
|
File::create(source.path().join("first"))?.write_all("some contents".as_bytes())?;
|
||||||
File::create(source.path().join("third"))?;
|
File::create(source.path().join("second"))?.write_all("some contents".as_bytes())?;
|
||||||
|
File::create(source.path().join("third"))?.write_all("some other contents".as_bytes())?;
|
||||||
|
|
||||||
let backup_engine = BackupEngine::new(&source.path());
|
let backup_engine = BackupEngine::new(&source.path());
|
||||||
backup_engine.backup();
|
backup_engine.backup();
|
||||||
|
|
Loading…
Reference in a new issue