diff options
author | Janco Wolmarans <janco@jemstep.com> | 2020-03-10 11:51:11 +0200 |
---|---|---|
committer | Janco Wolmarans <janco@jemstep.com> | 2020-03-10 11:51:11 +0200 |
commit | d368da8f096cf79533672c51830527830a37af8f (patch) | |
tree | e001c6ef4551ac27a05670b46202c7925073b9f9 | |
parent | f498ac29d5ba01ac93ce220fd9b015d0a2c13807 (diff) |
PYKE-11910: Add test case verifying that rebased branch is allowed when checking rebase config enforced
-rw-r--r-- | tests/policies_test.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/policies_test.rs b/tests/policies_test.rs index b42eb4c..eeecc52 100644 --- a/tests/policies_test.rs +++ b/tests/policies_test.rs @@ -401,3 +401,21 @@ fn verify_unrebased_branch_is_blocked_if_required() { .unwrap(); assert!(result.is_err()); } + +#[test] +fn verify_rebased_branch_is_allowed_when_required() { + before_all(); + let result = policies::verify_git_commits::<LiveGit, MockGpg>( + &LiveGit::default("./").unwrap(), + MockGpg, + &VerifyGitCommitsConfig { + verify_rebased: true, + ..verify_commits_config() + }, + "eb5e0185546b0bb1a13feec6b9ee8b39985fea42", + "3eb315d10e2ad89555d7bfc78a1db1ce07bce434", + "refs/heads/master", + ) + .unwrap(); + assert!(result.is_ok(), "Error: {:?}", result); +}
\ No newline at end of file |