Skip to content

Commit a65e8b9

Browse files
committed
extend test
1 parent 7327c28 commit a65e8b9

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

git2-hooks/src/lib.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -882,9 +882,15 @@ exit 0
882882
)
883883
.unwrap();
884884

885-
assert!(
886-
res.is_successful(),
887-
"Expected Ok result, got: {res:?}"
885+
let HookResult::Run(response) = res else {
886+
panic!("Expected Run result, got: {res:?}");
887+
};
888+
889+
assert!(response.is_successful());
890+
// When remote is None, URL should be passed for both arguments
891+
assert_eq!(
892+
response.stdout,
893+
"arg1=https://example.com/repo.git arg2=https://example.com/repo.git\n"
888894
);
889895
}
890896

0 commit comments

Comments
 (0)