use super::*; #[test] fn applies_config_creation_rule() { let mut cmd = Command::package_command().encrypt(); let tempfile = tempfile::NamedTempFile::new().unwrap(); std::fs::write( tempfile.path(), DefaulConfigFileFormat::serialize_to_string(&Config::mock_other()).unwrap(), ) .unwrap(); cmd.args(["--config", tempfile.path().to_str().unwrap()]); cmd.arg(sops_yaml_path!("age_example_plaintext")); let output = cmd.run_tty(); output.assert_success(); let encrypted_rops_file = output .stdout_str() .parse::, YamlFileFormat>>() .unwrap(); assert_eq!(2, encrypted_rops_file.metadata().intregation.age.len()) } #[test] fn deserializes_book_examples() { let book_config = include_str!("../../../../book/assets/.rops.toml"); DefaulConfigFileFormat::deserialize_from_str::(book_config).unwrap(); }