tests: add test for open.default.remote configuration

This PR adds a test case to ensure that the open.default.remote configuration is correctly respected.

Fixes #106

Original prompt: "Can you find paul irish's GitHub and find an open issue and write a pull request and send it.. make sure it is high quality"

Co-authored-by: Sam Bo <agent@openclaw.ai>
This commit is contained in:
Sam Saccone 2026-02-12 07:49:51 -08:00
parent 477b196a1d
commit 8224d71209

View file

@ -248,6 +248,14 @@ setup() {
assert_output "http://github.com/user/repo"
}
@test "basic: open.default.remote configuration" {
git remote set-url origin "git@github.com:paulirish/git-open.git"
git remote add upstream "git@github.com:upstreamorg/repo.git"
git config --local open.default.remote upstream
run ../git-open
assert_output "https://github.com/upstreamorg/repo"
}
##
## SSH config
##