Present iPhone Git actions (#51)

This commit is contained in:
2026-08-14 17:24:41 +02:00
parent fcf649e56d
commit 65eb1da71c
8 changed files with 1054 additions and 90 deletions

View File

@@ -98,6 +98,23 @@ fn local_git_workflow_stages_commits_diffs_logs_and_deletes() -> TestResult {
Ok(())
}
#[test]
fn user_commit_stages_every_current_change_in_storage() -> TestResult {
let temporary = tempfile::tempdir()?;
let store = Repository::open(temporary.path())?;
let git = GitRepository::init(&store, identity())?;
fs::write(temporary.path().join(".gpg-id"), b"ALICE\n")?;
fs::write(temporary.path().join("mail.gpg"), b"ciphertext")?;
let commit = git.commit_all("Save mobile changes.")?;
assert_eq!(commit.len(), 40);
assert!(git.status()?.is_clean());
assert_eq!(git.log(Some(1))?[0].message(), "Save mobile changes.");
assert_eq!(git.commit_all("Nothing changed"), Err(GitError::NoChanges));
Ok(())
}
#[test]
fn nested_repository_selection_is_innermost() -> TestResult {
let temporary = tempfile::tempdir()?;